Friday, 30 May 2014

jQuery window.load() vs document.ready()

$(window).load(function () {


$(function() {
$( document ).ready(function() {

ready() executes when the DOM is fully loaded (see  
load() Executes always later than ready() when all the content (images, css, etc) has been loaded

Had problem when showing a confirmation dialog when the page was rendered; images where not loaded!

No comments:

Post a Comment