Codeinwp / Nivo-Slider-jQuery

Nivo Slider - The Most Awesome jQuery Image Slider
http://docs.themeisle.com/article/485-getting-started-with-the-nivo-slider-jquery-plugin
MIT License
1.25k stars 605 forks source link

Add Element Selector Option #381

Open rfvgyhn opened 10 years ago

rfvgyhn commented 10 years ago

This commit allows you to provider a selector to select which elements you want to be a part of the slider.

$("#gallery").nivoSlider({ slideSelector: "img" });

My use case was with using Ember and having to deal with <script> tags that are generated within the slider container.

<div id="gallery">
    <script id="metamorph-0-start"></script>
    <script id="metamorph-1-start"></script>
    <img src="someImage" />
    <img src="someImage2" />
    <script id="metamorph-1-end"></script>
    <script id="metamorph-0-end"></script>
</div>