【问题标题】:Bootstrap Tour how to make only show on one pageBootstrap Tour 如何只在一页上显示
【发布时间】:2018-01-15 02:12:03
【问题描述】:

我正在尝试使用 Bootstrap Tour 设置我的应用程序的导览,但遇到了一些问题。主要是我使用 node.js 和模板构建了我的应用程序。我只需要在单个页面上显示一个弹出窗口/dashboard,而不是其他所有内容。现在可以很好地执行模板,这意味着我希望它所在的 div 在sidebar.html 模板中。这是我的代码:

(function(){

var tour = new Tour({
    storage : false,
     steps: [
    {
      element: ".tour-step.tour-step-one",
      placement: "top",
      title: "Welcome to Phantom AM!",
      content: "This tour will guide you through some of the features we'd like to point out.",
    },
    {
      element: ".tour-step.tour-step-two",
      placement: "bottom",
      title: "Quick Tracker",
      content: "These four boxes show a quick look at what you have tracked so far.",
    },
    {
      element: ".tour-step.tour-step-three",
      placement: "bottom",
      title: "Add a manufacturer",
      content: "Start by adding a manufacturer.",
    },
    {
        element: ".tour-step.tour-step-four",
        title: "Title of my step",
        content: "Content of my step",
        path: "/dashboard/it/manufacturer/new"
    },

]
});

// Initialize the tour
tour.init();

// Start the tour
tour.start();

}());

第三组是给我带来问题的那一组。我试过host,但也许我用错了。

【问题讨论】:

    标签: javascript jquery twitter-bootstrap bootstrap-tour


    【解决方案1】:

    我可能会创建这样的东西:

    $('.btn').popover();
    
    $('.btn').on('click', function (e) {
        $('.btn').not(this).popover('hide');
    });
    

    然后在您的仪表板页面上专门隐藏/显示它。

    【讨论】:

      猜你喜欢
      • 2014-02-10
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 2015-04-24
      • 1970-01-01
      • 1970-01-01
      • 2019-06-14
      相关资源
      最近更新 更多