javascript - jQuery delay: Speeding up queue? -


I have a slideshow that basically changes the src attribute of an image and it disappears in and out is.

  Turn function on slideshow () {if (i> = images.length) {i = 0} var path = picture [i] .path; Var Name = Picture [i] .name; I ++; Image.attr ('src', path) image.animate ({opacity: 1}, 1000) .delay (5000). Value ({opacity: 0}, 500, start: slide show); }  

This works

I have anything that I call an image picker. Something looks like this:

  & lt; Ul id = "ImagePicker" & gt; & Lt; Li & gt; • & lt; / Li & gt; & Lt; Li & gt; • & lt; / Li & gt; & Lt; Li & gt; • & lt; / Li & gt; & Lt; / Ul & gt;  

When you click on one of the items, then the slideshow shows the corresponding image.

  $ ('# ImagePicker li'). Click (function () {Image.stop (True, False). Value ({Opacity: 0}, 10, Start Slide Show);});  

The problem is that sometimes it has to be annoyed and I'm not sure why this happens.

Anyone know why this could happen? It seems that it is happening during the delay and not during animate.

Update

Update 2

I can fix it like this but it seems a small hack:

  Image.animate ({opacity: 1}, 1000). Value ({opacity: 1}, 5000). Value ({opacity: 0}, 1000, start: slide show);  

The problem is related to delay () I decided to do this by:

  image.animate ({opacity: 1}, 1000) .met ({opacity: 1}, 5000). Value ({opacity: 0}, 1000, start: slide show);  

I'm not sure what's wrong with the delay but I got some information here:


Hope this Helps


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -