提供“;工具提示之旅”;
Best way to provide a "tooltip tour"
使用上下文工具提示快速浏览Web应用程序的最佳方式是什么?
用例:
- 用户导航到网络应用程序
- 某种形式的弹出窗口询问用户是否想要界面的导游
- 用户可以在每个工具提示上单击"下一步"以显示下一个工具提示
- 用户可以通过单击某种退出X或按钮随时取消旅行
有没有一个简单的图书馆可以做到这一点?
谢谢!
最简单的方法是使用Jeff Pickhardt的Guider JS javascript工具提示遍历库。它非常易于使用(尽管它也有一些非常高级的功能),并且完全符合您的描述。
您可以查看这个使用GuiderJS制作的工具提示演练的优秀示例。
如果你想在生产网站上看到一个工作示例,optimizely.com上会广泛使用它来为用户界面提供帮助和演练指南。
更新:ZURB基金会现在正在维护优秀的"Joyride"工具提示教程javascript库。
您也可以使用带迭代器的链表自己编写教程部分,迭代器总是调用回调来设置工具提示,并调用回调来关闭工具提示。然后您可以使用任何所需的工具提示脚本。这里有一个概念的快速证明,应该向你展示我的意思:
var toolTipList = {
tooltips: [],
currentTooltip: {},
addTooltip: function(tooltip){
var currentTail = this.tooltips.length > 0 ? this.tooltips[this.tooltips.length - 1] : {};
var newTail = {
tooltip: tooltip,
prev: currentTail
};
currentTail.next = newTail;
this.tooltips.push(newTail);
},
initialize: function(){
this.currentTooltip = this.tooltips[0];
this.currentTooltip.tooltip.callback();
},
next: function(){
if(this.currentTooltip.next){
this.currentTooltip.tooltip.close();
this.currentTooltip = this.currentTooltip.next;
this.currentTooltip.tooltip.callback();
}
}
};
for(var i = 0; i < 10; i++){
toolTipList.addTooltip({
callback: function(){
// called every time next is called
// open your tooltip here and
// attach the event that calls
// toolTipList.next when the next button is clicked
console.log('called');
},
close: function(){
// called when next is called again
// and this tooltip needs to be closed
console.log('close');
}
});
}
toolTipList.initialize();
setInterval(function(){toolTipList.next();}, 500);
JSFiddle链接
相关文章:
- d3.js Chord图的动态工具提示
- Graphiti中是否有任何工具提示功能
- "工具提示"jQuery插件坏了
- 单元格的工具提示或标题不显示超过2000个字符
- d3.js用按钮更新条形图工具提示
- 使Intro.js工具提示响应
- 画布中绘制的矩形区域的弹出工具提示
- 使用CSS/JavaScript更改剑道图工具提示文本颜色
- 禁用NVD3 multiBarHorizontalChart中0值的工具提示
- 如何更改已显示的工具提示
- 如何访问高图表工具提示中的任何特定数据
- 如何在jQuery点击函数中添加并显示引导工具提示
- 我可以't使用jQuery更改工具提示引导程序的位置
- 语义UI中格式化的工具提示
- 柱状图上的Highcharts工具提示
- 引导工具提示用法,在搜索字段中
- 将工具提示添加到d3散点图中
- Highcharts工具提示不显示corrosconding文本值,而是显示'未定义'
- 提供“;工具提示之旅”;
- Highcharts - Series工具提示在绘制x轴上之字形的线条时不起作用