nir9 / itemslide

JavaScript Touch Carousel Library with Zero Dependencies
https://itemslide.org
MIT License
647 stars 85 forks source link

ability to overwrite id='active' #11

Closed 0xgeert closed 9 years ago

0xgeert commented 9 years ago

In a lot of circumstances id=active is not ideal. The most simplest case as having multiple sliders on the page: 2 DOM-elements end up getting id=active which is not compliant.

What about a way to overwrite this behavior, or (and this may work well enough) generate some id's and keep a list of those generated. I.e.: itemslide-1, itemslide-2. etc.

nir9 commented 9 years ago

Yah but maybe a simpler solution would be to do class=active instead.

0xgeert commented 9 years ago

Yeah sure, didn't look at why you needed it. Still may I suggest using a namespaced classname such as itemslide-active instead, so it will play nice with other libraries?

nir9 commented 9 years ago

Sure I'll add it