basilio/responsiveCarousel

carousel not work after partially page post back....

Opened this issue · 3 comments

carousel work first time fine, but after page partially post back not work ..i have also recall function but not working....
i got following error

"TypeError: obj.config is not a function
[Break On This Error]
obj.config(defaults, obj);"

so can you please help me.....

same issue here, what was wrong on your case ? Did you manage to solve it ?

I am having same issue with this plugin.. when i load the content using ajax call.. the slider stops working no matter what i do.. i tried to initialize slider again but no success yet...

Actually i tweak js in my own way and hopefully this may work for you also... see it below...

// Carousel General Detection
$(window).ready( function(){
// Trigger Prepare Event Carousel
$(obj).trigger('prepareCarousel', [defaults, obj]);
// Init some defaults styles
obj.init();
// ResizeEnd event
$(window).on('resize', function(){
if( this.carouselResizeTo ) clearTimeout(this.carouselResizeTo);
this.carouselResizeTo = setTimeout(function(){
$(this).trigger('carouselResizeEnd');
}, 10);
});
});

        $(window).load( function(){
            // Preload if it`s neccesary
            obj.testPreload();
            // This configure and margins and variables when document is ready,
            // loaded and window is resized
            obj.config();
        });

replace above code with....
// Carousel General Detection
$(document).ready( setTimeout(function(){
// Trigger Prepare Event Carousel
$(obj).trigger('prepareCarousel', [defaults, obj]);
// Init some defaults styles
obj.init();
// ResizeEnd event
$(window).on('resize', function(){
if( this.carouselResizeTo ) clearTimeout(this.carouselResizeTo);
this.carouselResizeTo = setTimeout(function(){
$(this).trigger('carouselResizeEnd');
}, 10);
});
},500));

        $(document).load( function(){
            // Preload if it`s neccesary
            obj.testPreload();
            // This configure and margins and variables when document is ready,
            // loaded and window is resized
            obj.config();
        });