Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Cycle - 'next', 'prev', & pause actions reset autostop & autostopCount?
    primarykey
    data
    text
    <p>I'm working with a Jquery cycle slideshow, and I want to stop at the last slide, but autostop seems to reset itself upon any resume, next, or prev action.</p> <p>For example, say I've got this slideshow:</p> <pre><code>&lt;div id="slideshow"&gt; &lt;div id="slide_0"&gt; &lt;img src="0.jpg"&gt; &lt;div class="caption"&gt;lorem ipsum&lt;/div&gt; &lt;/div&gt; &lt;div id="slide_1"&gt; &lt;img src="1.jpg"&gt; &lt;div class="caption"&gt;lorem ipsum&lt;/div&gt; &lt;/div&gt; &lt;div id="slide_2"&gt; &lt;img src="2.jpg"&gt; &lt;div class="caption"&gt;lorem ipsum&lt;/div&gt; &lt;/div&gt; &lt;div id="slide_3"&gt; &lt;img src="3.jpg"&gt; &lt;div class="caption"&gt;lorem ipsum&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;!--#slideshow--&gt; &lt;div id="navigation"&gt; &lt;a id="next"&gt;NEXT&lt;/a&gt; &lt;a id="prev"&gt;PREV&lt;/a&gt; &lt;/div&gt;&lt;!--#navigation--&gt; &lt;script type="text/javascript"&gt; $('#slideshow').cycle({ fx: 'fade', speed: 1000, timeout: 7000, autostop: true, next: '#next', prev: '#prev' }); &lt;/script&gt; </code></pre> <p>if, while the slideshow is playing, I hit '#next' twice, it will actually stop the slideshow on #slide_1, instead of on #slide_3. Pausing and resuming seems to reset the counter as well. I tried using autostopCount and it seems to be in the same boat.</p> <p>My javascript isn't the best, but I've been thinking of how I might be able to use the OnAfter callback to do a check for the slide number, but I don't know how to get information out of the cycle object, or what its variables are. Thoughts?</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload