Possible to have 2 x Nivo Sliders on the same page?
  • Hi Neil, hi Mick,

    A few months back I had an issue adding a Nivo slider on to the same page as a Mobile Menu, and Mick helpfully gave me this advice:

    "Try this:

    Double click the frag HTML box that holds the code for the Nivo slider and highlight these 2 lines of code

    jQuery(document).ready(function($) {

    And copy and replace it with this single line of code

    $(document).ready(function($) { "

    This has worked really well (thank you), and now I'm wondering if it's possible to add another Nivo slider (using different images) to the same page as the one with the original Nivo slider and the Mobile Menu? If so, how would I do that, please? (I've tried just adding another asset and editing the HTML fragment with the new image names etc, but it doesn't show properly.

    Many thanks in advance for your assistance.


    P.S. I'm using WebPlus X8.
  • Hi Rob,

    It is possible to have 2 Nivo Sliders on the same page but you would need to make a couple of edits to the frag box holding the code for the 2nd slider

    Double click the 2nd slider you have added to the page holding the 1st slider and first look for this code near the top


    Change #slider to #slider1

    The scroll further down the frag box and just before where the images get called and look for this code

    <div class="slider-wrapper theme-default"><div id="slider" class="nivoSlider">

    Now change the div id name from slider to slider1 so it matches what you changed the first line of code to (do not put a # in front of this code, just change the name only)

    Then change the names of the images to reflect the images you need for slider 2 and preview in a browser, hopefully you should have 2 workable Nivo Sliders running side by side.

    Hope this helps and let us know if that sorts your query out successfully

    Note: I actually made a demo a while ago for a user asking the same thing and I managed to put 4 nivo sliders on the same page

    Nivo Demo

    Again, hope this helps ;-)
  • Hi Mick,

    Thank you so much for the swift response!

    I've made the changes you suggested, and now all is working perfectly, I'm so pleased that this is possible in WebPlus. Also, your demo page showed me clearly what the different themes available for Nivo are, and so with further changes I've now further enhanced the page I was working on.

    Thanks again for such great support!
  • My pleasure Rob and thanks for the feedback ;-)
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion