0

How can I use IntroJs for different groups of element. Actually I want to use it for multiple part at same page. As per their documentation

For example introJs(".introduction-farm").start(); runs the introduction only for elements with class='introduction-farm'

Now I tried with static id or dynamic Id but this part is not working. if I use introJs().start(); then It will work but now if on page I want to create three separate introduction then this method combine them into one. So anybody here able to successfully implement this. Then please share with me.

Tushar Sharma
  • 101
  • 1
  • 6

1 Answers1

1

just add data-step, data-intro and data-position attributes to the grouped divs e.g.

<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right'></div>

and then onclick just do introJs().start();

e.g.

    <a class="btn btn-large btn-success" href="javascript:void(0);" onclick="javascript:introJs().start();">Show me how</a>

for details:

https://github.com/usablica/intro.js/blob/master/example/hello-world/index.html

Chandan Rai
  • 9,879
  • 2
  • 20
  • 28
  • 2
    Yes I know this. But if we want to use it for multiple component in same page then we can pass the classname. But I can't make it to work. – Tushar Sharma May 17 '16 at 13:15