Reputation: 1
Attempting to get jQuery to execute a method upon loading a page fails for Chrome and IE9. The following attempts to execute a method have been tried to no avail:
(function($) { $(document).ready(function(){
slideShow(7500); }); })(jQuery);
$(document).bind("ready", function() { slideShow(7500); })
$(window).load(function() {slideShow(7500);});
alert(typeof $);
Please note: the last of these attempts to execute jQuery failed to even produce an alert in Chrome and IE9.
Also, placing these scripts at the end of the document did not solve the problem. Doing so produced a blank page. All versions of the script listed above work in FireFox.
Upvotes: 0
Views: 725
Reputation: 2142
(function($) { $(document).ready(function(){
slideShow(7500); }); })(jQuery);
seems a bit convoluted (as jessica points out) but should still work. I suspect your slideShow()
function is the cuplrit.
Upvotes: 0
Reputation: 3141
Have you tried just
$(document).ready(function(){
slideShow(7500);
}
after you include jquery?
Upvotes: 1