También puede escribir la parte del recorrido usando una lista vinculada con un iterador que siempre llama a una devolución de llamada para configurar la información sobre herramientas y otra para cerrarla. A continuación, puede utilizar cualquier script de información sobre herramientas que desee. Aquí está una prueba rápida del concepto que se debe mostrar lo que quiero decir:
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 link
He escrito un corto [revisión] [1] acerca de páginas de orientación y webapp visitas que recientemente fue publicado en el dailyjs.com. En él puede encontrar varias soluciones de bricolaje para implementar esta funcionalidad. También le invitamos a consultar nuestra [orientación en la página como servicio] [2] en iridize.com. Espero que sea la mejor manera de proporcionar esto a sus usuarios, y estoy bastante seguro de que sería el más fácil. shame-less-yet-relevant-plug> [1]: http://dailyjs.com/2012/11/02/on-screen-guidance-intro [2]: https: // iridize.com –
odedbd