difference between document.ready and anonymous function in javascript
Risposte di colloquio
Anonimo
18 nov 2013
Anonymous function will be executed firs.
Anonimo
11 ago 2015
Self-invoking functions runs instantly i.e will be executed as soon as it is encountered in the Javascript.
$(document).ready(function() {})(); will trigger only after dom elements are completely constructed.