Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Stop button on first slide doesn't work #169
I did some changes earlier for the autoscroll plugin. Can you try with the latest one:
How does that work?
I linked your script (after the jquery tools), and got an alert (that I inserted) after
var t = $.tools.scrollable;
but the stop (and pause) functions were never reached. So I presume that there's something wrong with registering $.fn.autoscroll, or with my configuration.
My stop button code is:
My apologies, I did not appreciate that they are separate plugins. I was using "autoscroll" in the generic behavioral sense, thinking there would be only one plugin involved, not as a plugin name.
The problem I'm having is with the slideshow plugin.
I'll modify the original bug report accordingly to refer to slideshow not autoscroll.
Thanks for the clarification.
I'm using this file here on github:
when I load the page and immediately hit the stop button after the page loads the slideshow won't proceed.
have you tried with the latest version?
Latest version no difference. It's a subtle intermittent problem, and not always on the first slide. Can't get to the bottom of it.
Here's my setup, in case you can see anything: http://pastie.org/1167576
With this setup, I can reliably reproduce the problem by hitting Play, Next, and Stop in rapid succession. This causes the Stop to fail, in case that gives you (or anyone) a clue.
Presumably a subtle timing issue, and interaction among the two timers.
I wondered if timer or startTimer could ever have a 0 (zero) value, and therefore read false for the pause function entry condition. Logically possible, but I doubt it.
The demo at http://flowplayer.org/tools/demos/tabs/slideshow.html exhibits the same behaviour: click on Next and Stop in rapid succession - Stop fails.
I've tried a number of things, and have a theory that clearInterval for startTimer does not stop a startTimer method already underway. IOW does the startTimer method check "stopped" before it starts the slideshow timer? (the startTimer function is not defined in tabs,slideshow.js).
Does this make any sense?
I have now completely refactored the code. here is the commit:
and here is the new file:
please let me know how it works for you.
That seems to work fine.
I configured my test page thus:
The JQuery Tools subset is:
Tabs, Scrollable with Navigator plugin, and Mousewheel. The history plugin (not needed for this test anyway) is configured separately as I've changed that code to deal with the trailing "#" problem.
As a test, I modified the play button to include immediate next() thus:
... which works fine.
Very nice, and thanks!
What's the protocol around here? Should I deploy as is, or will there be an updated version integrating these changes shortly?