basilio / responsiveCarousel

Simple carousel
MIT License
113 stars 64 forks source link

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

Open krpatel opened 11 years ago

krpatel commented 11 years ago

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.....

ymarillet commented 9 years ago

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

ashish-joshi-sr commented 8 years ago

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...

ashish-joshi-sr commented 8 years ago

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();
        });