我有一个引导游览,当我点击“跳过”时,我想关闭弹出窗口但不结束游览,当我点击访问按钮时,我想继续关闭前的最后一步,我该怎么做?
按钮:
<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
};
});
谢谢。