Skip to content

Commit

Permalink
Fixing multiple-widget-on-page javascript bug
Browse files Browse the repository at this point in the history
Ensures generateCenterpointWidget is run only AFTER all images (and all
DOM elements for that matter) are downloaded and available.
  • Loading branch information
respondcreate committed Apr 14, 2015
1 parent ac5518b commit 604b544
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,4 @@ function generateCenterpointWidget(){
}
}

var jQuery = window.jQuery || django.jQuery;

if (jQuery){
jQuery(document).ready(function(){
generateCenterpointWidget();
});
}
window.addEventListener("load", generateCenterpointWidget);

0 comments on commit 604b544

Please sign in to comment.