Sinatra를 사용하여 부트 스트랩 3에서 Darkly 테마를 사용 중입니다. bootstrap3을 사용하여 탭을 구현하려고합니다. 하지만 탭이 전환되지 않습니다. 즉 브라우저를 열면 활성 탭만 표시됩니다. "탭 b"를 클릭하면 URL이 변경되지만 탭의 내용은 그대로 유지되고 탭은 다른 탭으로 전환되지 않습니다. 제발 도와주세요. 부트 스트랩 잉크를 포함해야합니까? 여기에 내 Haml 코드가있다.부트 스트랩에서 전환하지 않는 탭
!!!
%html{lang: "en"}
%head
%meta{charset: "utf-8"}/
%title Job Tracker
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
%link{href: "./bootstrap.css", media: "screen", rel: "stylesheet"}/
%link{href: "../assets/css/bootswatch.min.css", rel: "stylesheet"}/
%link{:href=>"//netdna.bootstrapcdn.com/bootswatch/3.1.1/darkly/bootstrap.min.css", :rel=>"stylesheet"}
%link{href: "http://fonts.googleapis.com/css?family=Special+Elite", rel: "stylesheet", type: "text/css"}/
%link{href: "https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css"}
:css
.container {margin top :20px}
body {padding-top : 70px; font-size : 18px; text-align: justify; font-family: 'Special Elite', cursive; }
h1, h2, h3, h4, h5, h6 { text-align: center; font-family: 'Special Elite', cursive; }
:javascript
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23019901-1']);
_gaq.push(['_setDomainName', "bootswatch.com"]);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
%body
.container
%ul#myTab.nav.nav-tabs{style: "margin-bottom: 30px;"}
%li.active
%a{ href: "#a"} a
%li
%a{ href: "#b"} b
%li
%a{ href: "#c"} c
%li
%a{ href: "#d"} d
.tab-content
#a.tab-pane.fade.active.in
%p Tab a
#b.tab-pane.fade.in
%p Tab b
#c.tab-pane.fade.in
%p Tab c
#d.tab-pane.fade.in
%p Tab d
%script{src: "public/js/bootstrap.min.js"}
안녕하세요. 나는 당신이 사이트를 처음 사용하는 것을 보았습니다. 그래서 일반적인 연습을 계속하기 위해서이 코드를 원래의 질문에 addenum (편집을 통해)으로 추가하고 @ AceWebDesign의 대답을 올바른 것으로 표시해야한다고 생각합니다. – iain