I’m trying to call a function after all slides in jquery cycle slider are loaded. on the options page of plugin’s website http://jquery.malsup.com/cycle/options.html I found out an option called after which can be used to call a function after each slides are loaded. but I want a function to be called when all slides are loaded and not each slides.
I added alert(“hello”) in onAfter(), and I see alert hello after every pager clicks. which i really dont want.
Following cycle initialization is used by me.
$('#lb_main-slide').cycle({
fx: 'fade',
speed: '100',
timeout: 0,
startingSlide: index,
pager: '#lb-slidethumbs',
pagerAnchorBuilder: imagepager2,
after: onAfter,
requeueOnImageNotLoaded: true
});
Is there any possible way where I can call a single function once all slides are loaded successfully ?
Thanks in Advance.
Well to solve this problem I called my function in core jquery.cycle.all.js file, in
after
So I called my function after cycle’s pager was built.
And it worked for me perfectly.
Thanks.