jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 734 forks source link

gallery not starting from ajax reload #787

Closed tlonero closed 8 years ago

tlonero commented 8 years ago

sending request via php script from ajax $.ajax({ type: "POST", url: "/includes/gallery.php", Result comes back fine with photo's and css but the problem is that it comes back but how would you reload the jquery.jcarousel.min.js ?

thanks

snake-345 commented 8 years ago

if jcarousel initialized then you may call $('.jcarousel').jcarousel('reload'). if jcarousel not initialized then you should initialize it after ajax

tlonero commented 8 years ago

hi snake this is the page http://www.exclusivepaperbags.com/jcart/products/express_flexo.php choose format 18x8x25 the first one choose Quantità then below Colore Fondo click on white, now this is where ajax goes and uses the jcarousel to load Stampa Flexografica choose 1 color now it calls ajax the pictures of the colors associated with white which are five.

$.ajax({ type: "POST", url: "/includes/offsetc.php", success: function(data){

        $("#mycarouseltwo").html(data);
        $('#mycarouseltwo').jcarousel('reload', {
animation: 'slow'

}

); this is the code I was using but still not working

thanks tony

snake-345 commented 8 years ago

Looks like you use old version jcarousel. Can you update it?

tlonero commented 8 years ago

ok

tlonero commented 8 years ago

downloaded the jcarousel-master from here and updated the jquery.jcarousel.js and jquery.jcarousel.min.js

tlonero commented 8 years ago

now the above gallery is not working after I updated the above files

snake-345 commented 8 years ago

Now you should look documentation and edit you code. In new version was make significant changes. http://sorgalla.com/jcarousel/examples/ajax/ it example about reload jcarousel after ajax

jsor commented 8 years ago

Closing for now, feel free to reopen if needed.