我想知道是否有人可以請讓我知道如何使用Twitter Bootstrap在Jade內創建下拉菜單。我現在有一個具有導航丸作爲層疊菜單:與Jade和Twitter Bootstrap的下拉菜單
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/stylesheets/css/bootstrap.min.css')
include inc/header
body
h1.page-header= title
ul.nav.nav-pills.nav-stacked
li#home: a(href='/') Home Page
li#clear: a(href='/clear') Clear Blog Posts
li#load: a(href='/load') Load Sample Posts
li#list: a(href='/showContacts') Show Blog
li#add: a(href='/add') Add Blog Post
script.
$(document).ready(function() {
$(".active").removeClass("active");
$("##{tab}").addClass("active");
});
block content
我一直在使用.dropdown嘗試和.dropdown_toggle代替.nav籌碼,但是我是相當新的玉器和引導等等不確定在哪裏從那裏去,我怎麼可以創建一個下拉菜單?
謝謝
你用什麼版本的bootstrap? –
版本2,我是否需要版本3? – brent
版本2,沒關係。你在哪裏包含jQuery文件?我遇到了一個錯誤。嘗試添加頭中的jquery文件作爲第一個js文件。讓我知道這是否有幫助。 –