cycle2 icon indicating copy to clipboard operation
cycle2 copied to clipboard

.cycle('destroy'); doesn't destroy sentinel when utilising data-cycle-auto-height="calc"

Open clkdigital opened this issue 8 years ago • 2 comments

The title explains it all really, when using data-cycle-auto-height="calc" the destroy function doesn't remove the sentinel .

clkdigital avatar Oct 02 '17 11:10 clkdigital

same here

Zeg31 avatar Mar 31 '18 13:03 Zeg31

The following should help ...

// removing style attr immediately after destroy doesn't seem to work, using a delay helps
$(document).on('cycle-destroyed', '.cycle-slideshow', function(){
    var slideshow = $(this);
    setTimeout(function(){
        slideshow.removeAttr('style');
    }, 100);
});

farinspace avatar Aug 24 '18 21:08 farinspace