TomodomoCo / total-slider

A WordPress plugin for creating, editing and removing ‘slides’ with text and images (for a homepage, for example).
GNU General Public License v2.0
7 stars 2 forks source link

Problems when two or more sliders in the same page #64

Closed Saporules closed 9 years ago

Saporules commented 9 years ago

If you put two or more sliders as in this page –> http://alquiladoralamision.com.mx/ you can't add the prev and next buttons for each one, because the plugin can not distinguish between them causing the slider to jump a slide, this because for each slider there's a [cycle2] --c2 init-- instance, and every time you click the next/prev button it activates the function the same number of instances

In my example I've 2 sliders, so in the console, the instruction as in the Noah's ark, always come in a pair. jquery.cycle2.js:608 [cycle2] cycle-next jquery.cycle2.js:608 [cycle2] cycle-next jquery.cycle2.js:608 [cycle2] cycle-prev jquery.cycle2.js:608 [cycle2] cycle-prev

chrisvanpatten commented 9 years ago

This is a Cycle2 issue, not a Total Slider issue, so I'm going to close this up.

That said, the easiest way to fix this is to avoid Cycle2's auto-initialisation (that is, don't use the cycle-slideshow class). If you give each slider its own ID or class, you should be able to initialise the sliders separately with a few lines of JavaScript. You can find more details on the Cycle2 site.