Intro.js不适用于特定类 [英] Intro.js not working for specific classes
问题描述
我无法仅通过类'case_event_intro'来启动元素的介绍,但是当我执行introJs(".case_event_intro").start();
时,什么也没有发生,即使该类和介绍性提示中有元素.定义(数据介绍和数据步骤).这些元素还有case_event_intro之外的其他类.可能是问题所在吗?还有其他条件可以使介绍仅适用于具有给定类的某些元素吗?
I'm not able to start the intro for elements only with class 'case_event_intro' but when I do introJs(".case_event_intro").start();
nothing happens, even though there are elements with that class and with the intro att. defined (data-intro and data-step). The elements have also other classes apart case_event_intro. Could that be the problem? Are there any other conditions to make the intro work for only some elements with a given class?
请参见屏幕截图.
推荐答案
在当前版本的IntroJ(v0.3.0)中,您无法使用类或其他内容开始对特定元素进行介绍.
In current version of IntroJs (v0.3.0) you cannot start introduction for specific element with a class or something.
您应该创建一个容器元素,然后为这些元素开始介绍:
You should create a container element, and then start introduction for those elements like this:
<div class="case_event_intro">
<div data-intro="Hello world" data-step="1">
...
</div>
</div>
然后致电:
introJs(".case_event_intro").start();
这篇关于Intro.js不适用于特定类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!