Start the script on Hover jQuery Cycle -


i have done jquery cycle in practice web design. problem is, want script start on mouse hover happens when refresh page, starts already. on 1st mouse over, stops. 2nd mouse over, starts slideshow , stops when it's mouse out. here's code:

jquery(function($){      // cycle plugin     $('.slides').cycle();      // pause & play on hover     $('.slideshow-block').hover(function(){         $(this).find('.slides').addclass('active').cycle('resume');     }, function(){         $(this).find('.slides').removeclass('active').cycle('pause');     });  }); 

i tried putting 'pause' or "pause" in $('.slides').cycle(); destroys plugin , there no more effect. help! :)

you can use .mouseover, .mouseout, .mouseenter or .mouseleave have better control of mouse actions.

example:

$(".slideshow-block").mouseover(function() {   $(this).find(".slides").addclass('active').cycle('resume'); }).mouseout(function(){   $(this).find(".slides").removeclass('active').cycle('pause'); }); 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -