Boostrap Collapse - 聚焦顶部区域

时间:2017-03-30 13:14:42

标签: javascript php twitter-bootstrap-3

我需要你的帮助。

我有三个bootstrap折叠按钮,我想在点击按钮后聚焦顶部区域。

这是代码:

<div class="wrapperbuttonsrooms" style="margin-top: -30px;">
<button type="button" class="buttonroominfo" data-toggle="collapse" data-target="#demo<?php echo $room['rateCode'];?>">Room Amenities</button>
<button type="button" class="buttonroominfo" data-toggle="collapse" data-target="#zweite<?php echo $room['rateCode'];?>">Room Description</button>
<button type="button" class="buttonroominfo" data-toggle="collapse" data-target="#dritte<?php echo $room['rateCode'];?>">Check-in Instructions</button>
<div id="demo<?php echo $room['rateCode'];?>" class="panel-body collapse fade">
   <?php include 'amenities-max.php';?>
</div>
<div id="zweite<?php echo $room['rateCode'];?>" class="panel-body collapse fade">
   <p style="font-size:17px;"> <b>Room Description:</b></p>
   <p><?php echo $room['RoomType']['descriptionLong']; ?></p>
</div>
<div id="dritte<?php echo $room['rateCode'];?>" class="panel-body collapse fade">
   <p style="font-size:17px;"><b>Special Check-in Instructions:</b></p>
   <br> 
   <p><?php echo @$specialCheckInInstructions; ?>   </p>
   <p><?php echo @$checkInInstructions; ?></p>
</div>

我怎样才能做到这一点?

0 个答案:

没有答案