簡體   English   中英

引導瀏覽在MVC中不起作用

[英]Bootstrap tour not working in MVC

我在MVC應用程序中使用Bootstrap瀏覽功能。 為了實現此導覽,我已經完成了以下引導鏈接中提到的所有操作

但是仍然無法在我的應用程序中運行游覽。

我已經在使用boostrap,所以我在使用以下文件

如果您使用的是Bootstrap,請包含bootstrap-tour.min.css和bootstrap-tour.min.js:

然后在$(document).ready(function(){

// Instance the tour
var tour = new Tour({
  steps: [
  {
    element: "#my-element",
    title: "Title of my step",
    content: "Content of my step"
  },
  {
    element: "#my-other-element",
    title: "Title of my step",
    content: "Content of my step"
  }
]});

// Initialize the tour
tour.init();

// Start the tour
tour.start();

如果您有任何線索,這里出了什么問題。

我在MVC5中使用引導瀏覽。 我確定您已准備就緒。 請檢查以下地方:

  1. 引導css和js以及jquery之后被引用。
  2. 通過alert($("#my-element").html());確保#my-element確實存在alert($("#my-element").html()); 等等
  3. 像tr這樣的東西不能成為元素。
  4. 使用tour.restart()而不是start() 因為您可能在這里遇到了我的問題: 引導瀏覽需要清除緩存才能再次工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM