将仅一个或两个步骤附加到IntroJs对象的最佳方法是什么,但仍然使它大部分由data-intro属性填充?
一个典型的场景是一些尾巴,或者是“感谢您通读,如果需要帮助,请给我们打电话”类型的消息,而不是附加到特定元素上。
我尝试在实例化之后添加步骤,但这似乎不起作用:
// a little code omitted that just does localstorage tracking of visit count.
jQuery('head').append('<link rel="stylesheet" type="text/css" href="#APP_IMAGES#introjs.css">');
jQuery.getScript("#APP_IMAGES#intro.js", function(data,textStatus,jqxhr){
console.log("Script injection: " + textStatus + ". Launch introJs tour of features delineated by data-intro element custom attributes...");
//Now a few elements that do not get easy declarative exposure of custom attributes in APEX builder:
$("#1_menubar_1i").attr("data-intro","Interactive Grid editors for key tables are available from the tab navigation controls on the top.");
var showem = introJs();
showem.addSteps({
steps: [
{ //step:99,
intro: 'If you need more detail, or you forgot how to perform a task in this application, take a look at the Documentation Library user manual.'
},
{ //step:100,
intro: 'If you run into a problem or the documentation was not helpful, please just <a href="mailto:support@xyz.tld?subject=&APP_ALIAS. assistance">send an email request for assistance to the service desk</a> (support@xyz.tld).'
}
]
});
showem.start();
});
我能够创建两个单独的简介对象,以编程方式创建第二个对象,然后从第一个对象的退出回调调用第二个(使用常规data-intro属性)。这样的作品,但效果却不尽如人意,当进度指示器以更多的步骤重新开始时,可能会使用户感到有些受骗。
将这些步骤显示在最后是我所要的。我不想显示“包装”消息,然后再让用户进行详细的浏览。