我们希望有一个通用的多页面导览,以及适用于 Web 应用程序的页面特定导览。多页面正在运行,特定页面的页面也触发,但调用这两个旅游数据对象。有没有办法在同一页面上进行多个游览?
function initTours(){
// Start intro tour
document.getElementById('startIntro').onclick = function() {
introJs().setOption('doneLabel', 'Next page').start('.intro-farm').oncomplete(function() {
window.location.href = 'nav_season.php?multipage=true';
});
};
var tourStep = $('.content .intro-farm').attr('data-step');
var nextLink = $('#nextTourLink').attr('href');
if (RegExp('multipage', 'gi').test(window.location.search)) {
introJs().setOption('doneLabel', 'Next page').goToStep(tourStep).start('.intro-farm').oncomplete(function() {
window.location.href = nextLink+'?multipage=true';
});
}
//Page specific
if ($('.page-tour').length > 0){
//Page specific tour
$('.pageHelp').on('click',function() {
introJs().start('.page-tour');
});
} else {
$('.pageHelp').on('click',function(){
$('#messageModal .row').html("<p>We don't have help tips for this page, but if you are stuck, please don't hesitate to <a href='#'>contact us</a>.</p>")
$('#messageModal').foundation('reveal', 'open');
});
}
}