Monday, October 31, 2011

diffence between JavaScript onload and jquery ready

Javascript have a method called window.onload(),it will be fired when all document(DOM,file,image) downloaded completely
but Jquery's $(document).ready() will be fired only when DOM is available for access,images may not be downloaded yet,so image's attributes like height may not available yet.

No comments:

Post a Comment