How can we use introJs for a particular group of element

时间:2016-05-17 11:13:25

标签: javascript intro.js

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.

1 个答案:

答案 0 :(得分:0)

只需将data-step,data-intro和data-position属性添加到分组的div中 e.g。

print_r(get_headers("https://200.35.78.130/", 1));

然后onclick只做introJs()。start();

e.g。

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

了解详情:

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