Intro.js更改工具提示位置
Intro.js change tooltip position
我在我的网站上使用intro.js进行浏览。我使用bottom
作为默认的工具提示位置,但有没有一种方法可以在教程开始后更改工具提示的位置?
这是我的代码:
tourPluginObject=introJs();
tourPluginObject.onchange(function(targetElement) {
if($(targetElement).attr("data-step")==5 && enteredStepFive==false){
enteredStepFive=true;//I entered a step five, so mark this
tourPluginObject.setOption('tooltipPosition','left');//Set new tooltip position
tourPluginObject.setOption('data-position','left');//Set new tooltip position
tourPluginObject.refresh();//Refresh layout
}
});
tourPluginObject.setOptions({'tooltipPosition': 'bottom' });//Set default tooltip position
tourPluginObject.start();//Start tour
如果你可以修改html,你可以在元素5上添加数据属性data-position="left"
,其他的没有位置,或者都设置为"bottom
"。
这样,步骤5将具有所需的位置,而无需在运行时对其进行修改。
相关文章:
- 我可以't使用jQuery更改工具提示引导程序的位置
- highcharts:更改工具提示和阴影(悬停)的标准位置
- jQuery UI 工具提示位置的奇怪行为
- jQuery:使用插件Tipsy将工具提示附加到鼠标光标位置
- 有没有办法强制工具提示显示在输入元素的特定位置
- 如何在使用 Dojo 的 dijit 下拉按钮时更改工具提示的位置
- 如何动态更改基于目标元素的绝对工具提示的位置
- 更改提示工具提示的重力/位置
- Intro.js更改工具提示位置
- D3(具有引导程序网格布局)-工具提示位置关闭
- 在图形上的最后一个值上设置工具提示位置
- JQueryMobile中的弹出/工具提示位置
- nvd3工具提示位置基于鼠标指针使用JavaScript
- 更改工具提示位置/箭头
- .js步骤和工具提示位置工作正常,除了"back"被按下
- 更改窗口大小的工具提示位置
- JQuery UI工具提示位置
- 指定工具提示位置
- 使用AngularJS UI使工具提示位置相对于窗口大小
- nvd3 multiBarHorizontalChart中的工具提示位置