bqworks / slider-pro

A modular, responsive and touch-enabled jQuery slider plugin that enables you to create elegant and professionally looking sliders.
MIT License
876 stars 387 forks source link

How to reload slider with different data? #302

Closed pokolokatepetl closed 3 years ago

pokolokatepetl commented 4 years ago

I would like to load new data that replaces the first one using a button. I've made such script:

$('.sp-slides').html(HTML); var slider = $( '#sliderRecepti' ).data( 'sliderPro' ); slider.destroy(); init();

First new data is loaded to the sp-slides than the init function destroys and rebuilds slider but nothing is working, images are missing, thumbs kind of work (new ones), but it is not working ok. I tried just replacing DIV contents and using update() but it also made a mess.

Any ideas what I am doing wrong?

davidghi commented 4 years ago

This should be possible unless there's a problem with the code. If you haven't fixed it yet, I can take a look if you post a link to the page.

Best, David