[英]how to setup 'bootstrap tour' in Ruby on Rails
我使用了bootstrap-tour.min.css和bootstrap-tour.min.js
<script type="text/javascript" src='bootstrap-tour.min.js'></script>
<link rel="stylesheet" type="text/css" href="bootstrap-tour.min.css">
這是我的查看頁面
<form>
<input id="one" value="one" />
<input id="two" value="two" />
</form>
這是我的js文件
// Instance the tour
$(function () {
var tour = new Tour();
tour.addStep({
element: "#one",
title: "Step 1",
content: "Content for step 1"
});
tour.addStep({
element: "#two",
title: "Step 1",
content: "Content for step 1"
});
// Initialize the tour
tour.init();
// Start the tour
tour.start();
});
// tour end
但仍然無法正常工作..有人幫助我:(!...
我必須回問一些問題,希望它們已經對您有所幫助。
您收到什么錯誤消息(如果有的話)?我認為bootstrap-tour依賴bootstrap,您是否進行了設置? 您是否使用了application.js / application.css? 或者如果您使用bootstrap-sass gem,則是application.css.scss?
您使用的是'boostrap-tour-rails'寶石,還是包括純CSS?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.