Pause On Hover seems to be breaking slide timings when used with a pager
I've got a Cycle2 instance running just fine, but it seems if I set pauseOnHover to true (or specify a valid selector string to target 'pausey' elements) it causes the slide timings to go crazy if I select a slide using the Pager.
If I let the slideshow run automatically, everything is fine. If I click on a pager element (slide #4 etc) the animation works, but the timings change such that the transitions keep happening every couple of seconds (regardless of the timeout variable, which was previously working correctly)
If i set pauseOnHover to false, this issue disappears.
I'm running this inside a WordPress site, so I'm using jQuery 1.83. Does Cycle2 require jQuery 1.9+ ?
Are there any known issues with pauseOnHover (esp. with a pager element that is overlayed on top of the slides?)
Any help would be gratefully received. I can provide an example link if that would help.
C2 should work just fine on jQuery 1.8. What version of the plugin are you using?
Thanks for the reply Mike. I'm using the latest version of C2 (taken yesterday from http://malsup.github.io/min/jquery.cycle2.min.js)
You can see the cycle live at www.camstar.com - obviously without the problem since it's a live site, I set pauseOnHover to false. (The backdrop fade is a separate event bound to cycle-on-before - but i've removed that piece and the timing issue is still present when pauseOnHover is true)
I'm not seeing that behavior:
http://jquery.malsup.com/cycle2/demo/pause-pager.php
What am I doing differently?
It's probably something in my implementation inside of WordPress but I can't debug it.
My pager element is outside of the cycle element, and overlayed on it with z-indexing. I have set the pause-on-hover declaratively now on www.camstar.com. If you click around the pager, it's pretty easy to get the cycle to transition every ~2s instead of the 6s value it should be.
There is a second cycle element on the page too (the background image) but that is set to manual transitions, triggered by the main cycle. They have different IDs but I wonder if some interval is getting confused?
I'm guessing you've never seen this problem before?
--UPDATE
I did a little screen recording to show you the bug in action: http://www.twiginteractive.com/TEMP/cycle2/
You can see that once I click back to slide #2, the transitions happen way quicker than expected, almost like 2 sets of "advance the slide" intervals are now running.
Interesting. Looks like it only happens in IE. Have you seen that behavior in any other browser?
Sadly, it does the same thing in Firefox and Chrome (latest versions) - I just happened to record in IE :(
Hmm, I wasn't able to reproduce it in Chrome or FF. But I could in IE.
On Mon, Jul 1, 2013 at 8:37 PM, twiginteractive [email protected]:
Sadly, it does the same thing in Firefox and Chrome (latest versions) - I just happened to record in IE :(
— Reply to this email directly or view it on GitHubhttps://github.com/malsup/cycle2/issues/230#issuecomment-20319956 .
Do you mean you could/couldn't reproduce it in your own environment, or on my live example site? I just tested the issue is present in FF & Chrome on my example site...
I was testing against your site (from my Mac).
On Mon, Jul 1, 2013 at 8:42 PM, twiginteractive [email protected]:
Do you mean you could/couldn't reproduce it in your own environment, or on my live example site? I just tested the issue is present in FF & Chrome on my example site...
— Reply to this email directly or view it on GitHubhttps://github.com/malsup/cycle2/issues/230#issuecomment-20320104 .
I can't speak to Mac vs PC (I don't have a Mac) but I wouldn't expect the OS to affect JavaScript behavior.
Here's a screenvid of the issue in FF and Chrome. http://www.twiginteractive.com/TEMP/cycle2-ff-chrome/
Is there any way to console.log the slide timer? (to see if there is more than one, or if the timing has gotten confused?)
Hi Mike -
I can recreate the issue on your own demo page: http://jquery.malsup.com/cycle2/demo/pause-pager.php
The timing bug occurs if you click on a 'pause-on-hover' pager item to navigate to a slide, then mouse-out whilst the transition is still occurring. Once you do that, the timing gets messed up - it was easier to see on my site because I have a longer transition period (and I'm using the cross-fade, not fade-out transition)
I made a quick screenvid - you can see each time you do the click-move, it makes the transitions faster & faster. I'd guess that somehow, several 'advance slide' timeout intervals are being created. Please let me know if I can do anything else to help debug (or if you have quick workaround, that would be awesome!)
http://www.twiginteractive.com/TEMP/cycle2-v3/
Thanks.
I'm pretty sure I've fixed this now. Thanks for the videos and legwork @twiginteractive.
Fix confirmed with MANY thanks!