tags:

views:

20

answers:

1

I am running this coda-slider script from http://www.ndoherty.biz/ Not Everytime, but quite often on the first load the coda slider box will be empty and the slider wont work, most of the time my image will be there and the slider will run since I have it set on auto. I am not quite sure why this happens. I seem to have had this happen to me with other jquery stuff just loading empty or super tiny images, anyone else seen this issue.

A: 

Instead of document.ready, like this:

$(document).ready(function() { ...code.... });
//or...
$(function() { ...code.... });

You should use the window's load event if you are depending on images to be there (often you see trouble otherwise in a first-load situation, since they're not cached), like this:

$(window).load(function() {
  $('#myElement').codaSlider();
});
Nick Craver
Thanks now it shows the loading gif. I actually had nothing in the parameter before .ready it looked like ().ready(function(){....}
Anders Kitson