Reputation: 623
On my slideshow, if the slide is clicked it will pause. But I want to disable the ability to click-to-pause until after the first slide transition (the title slide). Right now the "#slideshow" div is clickable as soon as the DOM is ready; too soon for me.
An abridged version of what I have now:
$(document).ready(function(){
$('#slideshow img').toggle(function() {
$('#slideshow').cycle('pause');
}, function() {
$('#slideshow').cycle('resume');
});
$('#slideshow').cycle({
/*options*/
});
});
Upvotes: 0
Views: 119
Reputation: 191729
You could just bind the .toggle
function (or change to .click
since .toggle
is deprecated for this use) with the after
option of .cycle
.
Upvotes: 1