导航菜单——通过单击另一个链接刷新页面时菜单需要保持打开状态
ul class="menu">
<li class="item1"><a href="#">Hardware</a>
<ul>
<li class="subitem1"><a href="receipt-printer.html">Receipt Printer</a></li>
<li class="subitem2"><a href="barcode-scanner.html">Barcode <span class="item-move2">Scanner</span> </a></li>
<li class="subitem3"><a href="card-swipes.html">Card Swipes</a></li>
<li class="subitem4"><a href="weighscales.html">Weighscales</a></li>
<li class="subitem5"><a href="touchscreens.html">Touchscreens</a></li>
<li class="subitem6"><a href="label-printer.html">Label Printer</a></li>
<li class="subitem7"><a href="customer-display.html">Customer <span class="item-move2"> Display</span></a></li>
<li class="subitem8"><a href="wap.html">WAP</a></li>
</ul>
</li>
<li class="item2"><a href="#">Software</a>
<ul>
<li class="subitem1"><a href="step1/install-ootpik.html">Installing ootpik</a></li>
<li class="subitem2"><a href="step1/pref-security.html">Preferences & <span class="item-move2">Security</span></a></li>
</ul>
</li>
</ul>
菜单结束 操作手风琴菜单的脚本
<!--initiate accordion-->
<script type="text/javascript">
$(function() {
var menu_ul = $('.menu > li > ul'),
menu_a = $('.menu > li > a');
menu_ul.hide();
menu_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu_a.removeClass('active');
menu_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
});
</script>
脚本结束
现在查看手风琴的网站: http ://www.ootpik.info/lauren/ootpik5/receipt-printer.html