Grow your CSS skills. Land your dream job.

Can’t add more than one JQuery slider on a page

  • # March 21, 2013 at 3:13 pm

    I am using Nivo Slider(JQuery) on my page. I want to add one more JQuery slider on the same page but not able to do so.
    I browsed a bit and also used JQuery – noConflict() function but it even didn’t work.
    Please help !

    # March 21, 2013 at 3:23 pm

    JavaScript:

    $(window).load(function() {
    $(‘#slider1′).nivoSlider({
    // settings
    });

    $(‘#slider2′).nivoSlider({
    // settings
    });
    });

    HTML:

    [div id="slider1" class="nivoSlider"]
    // content
    [/div]

    [div id="slider2" class="nivoSlider"]
    // content
    [/div>]

    Replace “[” and “]” with “< " and ">” in the HTML section.

    No need to use `noConflict()`. Which is only used when mixing different libraries.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".