How to add New slide in between existing slides in the Jquery Cycle Plugin? -
while using jquery cycle plugin, able insert slides dynamically in between existing slides , not @ end.
this code using
function onbefore(curr, next, opts) { //adding new slide opts.addslide(item); //item has dynamic slide data going added existing slides. }
thanks in advance!
you can add slide in position yo uwant, have wait cycle on slide before 1 need. works quite because add slide when need show , in position want.
function onbefore(curr, next, opts) { // on first pass, addslide undefined (plugin hasn't yet created fn); // when we're finshed adding slides we'll null out again if (!opts.addslide) return; //add type of logic here make sure in position //where want add slide if ($(curr).index() === 8 && $(next).index() === 9) { //adding new slide opts.addslide(item); } }
Comments
Post a Comment