0
我有一個引導遊覽,當我點擊'跳過'時,我想關閉彈出框但不結束遊覽,當我點擊訪問按鈕時,我想要在關閉之前的最後一步繼續,我怎麼做?關閉引導遊覽並不結束
按鈕:
<button class='btn btn-default' data-role='end'>${skip}</button>
代碼:
define(function() {
var tourElement = function getTourElement(tour){
return tour._options.steps[tour._current].element
};
var getConfig = function (tourSteps) {
return {
name: "virtual-visit",
container: "body",
keyboard: true,
storage: window.localStorage,
debug: true,
backdrop: true,
backdropContainer: "body",
backdropPadding: 0,
orphan: true,
duration: false,
steps: tourSteps
onShown: function(tour) {
var stepElement = tourElement(tour);
$(stepElement).after($('.tour-step-background'));
$(stepElement).after($('.tour-backdrop'));
},
onStart: function(tour) {
$('body').addClass('on-tour');
},
onEnd: function(tour){
}
};
};
var run = function (tourSteps) {
if ($(window).width() > 1024) {
tour = new Tour(getConfig(tourSteps));
tour.restart();
tour.init();
tour.start();
}
};
return {
run: run,
getConfig: getConfig
};
});
感謝。