我想在drupal中實現引導程序我有聯繫人id的'row'類。並補充COL-SM-12爲標題和說明,但working.I採取與OD的container.I正在做的工作accordian.js爲fine.css引導工作不bootstrap不能在html塊中工作
(function ($)
{
function contactList(){
\t $('.view-content .contactDesc:first').css('display','block');
\t $('.view-content .contactTitle:first , .view-content .contactDesc:first').addClass('active');
\t $('.view-content .contactTitle:first .glyphicon').addClass('rotate');
\t $('.officeAddress .colorme:visible:odd').addClass('grey');
$('.officeAddress .colorme:visible:even').addClass('purple');
$('.contactTitle').click(function(){
if(!$(this).hasClass('active')){
\t $('.contactTitle .glyphicon ').removeClass('rotate');
\t $(this).find('span.glyphicon').toggleClass('rotate');
$('.contactDesc').slideUp();
$('.contactTitle').removeClass('active');
\t $('.contactDesc').removeClass('active');
\t $(this).next('.contactDesc').addClass('active');
$(this).next('.contactDesc').slideDown(function(){
$('.officeAddress .colorme').removeClass('grey').removeClass('purple');
$('.officeAddress .colorme:visible:odd').addClass('grey');
$('.officeAddress .colorme:visible:even').addClass('purple');
});
$(this).addClass('active');
}
});
\t }
jQuery(document).ready(function($) {
contactList();
});
});
.contactForm{
width: 960px;
margin: 0 auto;
\t margin-top: 59px;
}
.contactForm img{
\t width: 960px;
\t height: auto;
}
.officeAddress{
width:960px;margin:0 auto;
font-family: Raleway;
}
.contactTitle{
\t width:960px;
display: inline-block;
\t padding: 18px 40px 18px 40px;
\t font-size:20px;
\t }
.contactDesc{
\t display:none;
\t font-size:23px;
\t padding: 40px 0 0px 0;
\t font-family: Raleway-Regular;
\t }
.ContactAddressHeading p,.currentOpening{
\t width: 960px;
\t margin: 0 auto;
\t font-size: 30px;
\t font-weight: bold;
\t color:#000000;
\t padding: 38px 0px 0px 0;
\t text-align: center;
}
.rotate {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.container-fluid{
\t padding:0 !important;
}
.officeAddress .purple{
background:#663399;
color:#ffffff;
}
.contentWidth .purple,.contentWidth .purple p{color:#ffffff;}
.purple .glyphicon{
\t color:#5d218b;
}
.grey{
background:#f7f7f7;
color:#6c2a9f;
}
.grey .glyphicon{color:#e2dfdf;}
.purple .row-1-col-1,.purple .row-1-col-1-right,.purple .col-email a,.purple p{
\t color:#ffffff;
}
.grey .col-email a{
\t color:#000000;
}
.contactTitle.purple{
\t color:#ffffff;
}
.contactTitle h3{
display: inline;
font-size: 20px;
font-family: Raleway-Medium;
}
.contactTitle .glyphicon{float: right;top: 6px;}
.form_image{
width: 960px;
margin: 0 auto;
\t margin-top: 85px;
}
.form_image img{
\t width: 960px;
\t height: auto;
}
#ContactAddressHeading { \t margin-bottom: 55px;}
#contact{ margin-bottom: 60px;}
.officeAddress{width:960px;}
.contactDesc {display: none;font-size: 18px;}
.col-img { margin-bottom:10px; }
.row-1-col-1 { float:left; padding: 0px 0 0px 70px;}
.row-1-col-1-right { min-height: 250px;float:right; padding: 0px 40px 0px 0;}
.addressImg{float:left;}
.col-address,.col-tele,.col-email{padding-left: 15px;float:left;}
.col-address span{font-family: Raleway-SemiBold;font-size: 14px;}
.address, .tele , .email{display:inline-block;}
.row-1-col-1-right .tele{
\t width: 100%;
}
.address{padding-bottom: 5px;}
.grey .row-1-col-1,.grey .row-1-col-1-right,.grey .row-1-col-1 p,.grey .row-1-col-1-right p{color:#000000;}
.col-email p,.col-email div,.col-tele p,.col-tele div{display:inline;}
.contactDesc .views-row{padding-bottom:40px;}
.col-address div p {font-size: 14px;font-family: Raleway-Regular;margin: 0 0 1px;}
@media(min-width:0px)and (max-width:780px){
\t
\t .row-1-col-1-right{
\t \t float:left;
\t \t padding:0px 0 0px 0px;
\t \t min-height:250px;
\t }
\t .row-1-col-1{padding:0;}
\t .contactDesc{
\t \t float:left;
\t \t width:100%;
\t }
\t .address{
\t \t float:left;
\t \t width:100%;
\t }
\t .ContactAddressHeading p{
\t \t width:auto;
\t \t font-size: 25px;
\t \t padding: 25px 0px 0px 0;
\t }
\t #ContactAddressHeading{
\t \t margin-bottom: 25px;
\t }
\t #contactForm{
\t \t display:none;
\t }
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="contact" class="row">
\t <div class="view view-contact view-id-contact view-display-id-block view-dom-id-afcbc0b58ed02301ac5efcccfc9ea312">
\t \t <div class="view-content">
\t \t \t <div class="officeAddress">
\t \t \t \t <div class="contactTitle colorme col-sm-12 col-md-12 active purple">
\t \t \t \t \t <h3>Chennai -India</h3>
\t \t \t \t \t <span class="glyphicon glyphicon-triangle-right rotate"></span>
\t \t \t \t </div>
\t \t \t \t <div class="contactDesc col-sm-12 col-md-12 colorme active grey" style="display: block;">
\t \t \t \t \t <!-- <div class="contentWidth col-md-12 col-sm-12"> -->
\t \t \t \t \t <div class="col-sm-12 col-md-6 row-1-col-1 views-row views-row-1 views-row-odd views-row-first">
\t \t \t \t \t \t <!--<div class="contentWidth"><div class="row-1-col-1"> -->
\t \t \t \t \t \t <div class="address"></div>
\t \t \t \t \t \t <div class="tele"></div>
\t \t \t \t \t \t <div class="contactMail"></div>
\t \t \t \t \t \t <!--</div></div> -->
\t \t \t \t \t </div>
\t \t \t \t \t <div class="col-sm-12 col-md-6 row-1-col-1-right views-row views-row-2 views-row-even">
\t \t \t \t \t \t <!--<div class="contentWidth"><div class="row-1-col-1"> -->
\t \t \t \t \t \t <div class="address"></div>
\t \t \t \t \t \t <div class="tele"></div>
\t \t \t \t \t \t <div class="contactMail"></div>
\t \t \t \t \t \t <!--</div></div> -->
\t \t \t \t \t </div>
\t \t \t \t \t <div class="col-sm-12 col-md-6 row-1-col-1 views-row views-row-3 views-row-odd views-row-last">
\t \t \t \t \t \t <!--<div class="contentWidth"><div class="row-1-col-1"> -->
\t \t \t \t \t \t <div class="address"></div>
\t \t \t \t \t \t <div class="tele"></div>
\t \t \t \t \t \t <div class="contactMail"></div>
\t \t \t \t \t </div>
\t \t \t \t \t <!-- </div> -->
\t \t \t \t </div>
\t \t \t </div>
\t \t \t <div class="officeAddress">
\t \t \t \t <div class="contactTitle colorme col-sm-12 col-md-12 purple">
\t \t \t \t \t <h3>Hyderabad - India</h3>
\t \t \t \t \t <span class="glyphicon glyphicon-triangle-right"></span>
\t \t \t \t </div>
\t \t \t \t <div class="contactDesc col-sm-12 col-md-12 colorme">
\t \t \t \t \t <!-- <div class="contentWidth col-md-12 col-sm-12"> -->
\t \t \t \t \t <div class="col-sm-12 col-md-6 row-1-col-1 views-row views-row-1 views-row-odd views-row-first views-row-last">
\t \t \t \t \t \t <!--<div class="contentWidth"><div class="row-1-col-1"> -->
\t \t \t \t \t \t <div class="address"></div>
\t \t \t \t \t \t <div class="tele"></div>
\t \t \t \t \t \t <div class="contactMail"></div>
\t \t \t \t \t
\t \t \t </div>
\t \t </div>
\t </div>
</div>
</div></div>
你有沒有包括包括啓動腳本之前的jQuery腳本? Bootstrap需要jquery.js才能工作。 (我沒有在html文件中看到包含jquery.js) – samAlvin