Anonymous function vs. separate named function for initialization in jquery
- by Martin N.
We just had some controversial discussion and I would like to see your opinions on the issue:
Let's say we have some code that is used to initialize things when a page is loaded and it looks like this:
function initStuff() { ...}
...
$(document).ready(initStuff);
The initStuff function is only called from the third line of the snippet. Never…