jQuery Cycle: How to stop it by default, and start it on mouseover?
Hi,
is it possible to make the jQuery Cycle script paused by default - ie. when page loads, it will not automatically start sliding through the images?
I am fairly certain this is pretty simple to do with the cycle('stop') (or 'pause'), but I cannot seem to get it to work.
Below is the code, which makes the slide show play after page has loaded - then it pauses after first mouseover (mouse hover and mouse away) - and then it plays again when mouse hovers. So in other words: after the first mouseover, the script works like it is supposed to...
- $(document).ready(function(){
$('.name-of-container').hover(
function() {
$(this).cycle({
timeout:500,
delay: 1,
speed: 1
})
},
function(){
$(this).cycle('pause');
}
).trigger('mouseenter');
});
Thank you for any assistance.