booncon / slippry

Responsive slider plugin for jQuery
slippry.com
MIT License
471 stars 133 forks source link

Multiple slippry sliders in a page #132

Closed starryprabin closed 6 years ago

starryprabin commented 6 years ago

Putting multiple sliders in a page makes undefined behaviour in one of the sliders. I added two sliders in a page. both generated the following code

<ul class="sy-pager">
    <li><a href="#2">2</a></li>
    <li><a href="#3">3</a></li>
    <li><a href="#4">4</a></li>
    <li><a href="#5">5</a></li>
    <li><a href="#7">7</a></li>
    <li><a href="#8">8</a></li>
    <li><a href="#9">9</a></li>
</ul>

It might be because of same IDs assigned to both sliders element elements.

Thanks.

thexmanxyz commented 6 years ago

@starryprabin Multiple sliders should work on one page without any problems, I can confirm this. You have to check the javascript container binding (which must be declared with different selectors - e.g. HTML IDs). The code you linked does not contain any ID these are just href values which do not act as unique identifier at least I can't confirm that they do or are used for.

starryprabin commented 6 years ago

Oops. my bad. I used the same class selector for three different sliders. I am closing this issue. Thanks.