Tutorial :MooTools: domready vs load



Question:

With which will function(){} fire first?

A) window.addEvent('domready', function(){});  B) window.addEvent('load', function(){});  


Solution:1

domready will fire first.

http://demos111.mootools.net/DomReadyVS.Load


Solution:2

domready comes first as load waits till everything on the page is loaded before executing.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »