Ninja Slider / Posts /

How to include multiple responsive image sliders in the same page

14
How can I include multiple Ninja Image Sliders in the same page?
Edvwardville  10 years ago   viewed: 16045    

1 Answer

-1
You should have different ninja slider IDs for each slider. Say you have given them the id ninja-slider and ninja-slider2. Then open the ninja-slider.js with Notepad, and edit it as below:

var nsOptions = {sliderId: "ninja-slider", ...};
var nsOptions2 = {sliderId: "ninja-slider2",...};
var nslider = new NinjaSlider(nsOptions);
var nslider2 = new NinjaSlider(nsOptions2);

// (the following should be remain untouched)
/* Ninja Slider ....

In this approach you have two Ninja Sliders in the same page.

Notice you also need to style them differently with the css selector #ninja-slider and #ninja-slider2.
Milo   10 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: