在腳本中,我已經修改了相同的腳本有內容區域切換功能,文本「滑出式導航」
<script type="text/javascript">
$(document).ready(function() {
$menuLeft = $('.pushmenu-left');
$nav_list = $('#nav_list');
$nav_list.click(function() {
$(this).toggleClass('active');
$('.pushmenu-push').toggleClass('pushmenu-push-toright');
$menuLeft.toggleClass('pushmenu-open');
});
});
$(document).ready(function() {
$menuLeft = $('.pushmenu-left');
$content_list = $('#contentpane');
$content_list.click(function() {
$(this).toggleClass('active');
$('.pushmenu-push').toggleClass('pushmenu-push-toright');
$menuLeft.toggleClass('pushmenu-open');
});
});
</script>
的下方的區域是做HTML頁面的變化。我已經添加了一個div的內容,所以點擊它可以通過腳本檢查
<div class="container">
<div class="main">
<section class="buttonset">
<div id="nav_list">Menu</div>
</section>
<section class="content">
<div id="contentpane">
<h1>Slideout Navigation</h1>
<p>
</p>
</div>
</section><!-- End Content -->
</div><!-- End Main -->
</div><!-- End Container -->
太棒了!謝謝。 –