How do you undo the 'destroy' command in cycle2?

133 views Asked by At

I'm trying to activate cycle2 on a list of images when the window gets too small to fit all the images and show all the images when the browser is big enough to display them. (#bignav is element containing the images.) I did some testing and the function stops working after I destroy it as it wont start it again. Is their another way of going about it? Could I activate it and deactivate by changing the name of the class?

$(window).resize(function() {
    var width = $(window).width();
    if (width < 1325) {
        $('#bignav').cycle();
    } else {
        $('#bignav').cycle('destroy');
    }
});
1

There are 1 answers

0
FiLeVeR10 On

Re-initialize it...

$('#bignav').cycle('reinit');

They have an api here.