首页 > 解决方案 > 引导之旅 - 获取类型错误:无法读取未定义的属性“onNext”

问题描述

我正在尝试在我的网站中实现引导程序。但是,当我在游览弹出框上单击下一步时,我总是遇到错误,并且游览不会进入下一步。

bootstrap-tour.js:469 Uncaught TypeError: Cannot read property 'onNext' of undefined
at Tour._showNextStep (bootstrap-tour.js:469)
at Tour._callOnPromiseDone (bootstrap-tour.js:812)
at Tour.next (bootstrap-tour.js:178)
at HTMLButtonElement.<anonymous> (bootstrap-tour.js:741)
at HTMLDocument.dispatch (jquery-1.9.1.js:3074)
at HTMLDocument.elemData.handle (jquery-1.9.1.js:2750)
Tour._showNextStep @ bootstrap-tour.js:469
Tour._callOnPromiseDone @ bootstrap-tour.js:812
Tour.next @ bootstrap-tour.js:178
(anonymous) @ bootstrap-tour.js:741
dispatch @ jquery-1.9.1.js:3074
elemData.handle @ jquery-1.9.1.js:2750

以下是我作为游览步骤添加的内容:

$(document).ready(function() {

  var tour = new Tour({

    steps: [
        {
          element: ".stepClass",
          title: "Title1",            
          content: "Message 1.",
          debug:true//Set this option to true to have some useful informations printed in the console.
        },
        {
          element: ".stepClass2",
          title: "Title2",
          content: "Message 2",
         debug:true
        }

      ],
      backdrop: true,
      storage: false

  });
 tour.init();
 tour.start();

});

有人可以帮忙吗?

标签: jquerytwitter-bootstrap-3bootstrap-tour

解决方案


推荐阅读