選項卡菜單之間的「當前」類下面的HTML代碼,即:移動基於選擇
<div id="listnav">
<ul id="nav">
<li id="home"><a href="#" id="current">Home</a></li>
<li id="features"><a href="#">Features</a></li>
<li id="whysp"><a href="#">Why sP</a></li>
<li id="screenshots"><a href="#">Screen Shots</a></li>
<li id="faq"><a href="#">FAQ</a></li>
<li id="contactus"><a href="#">Contact Us</a></li>
</ul>
</div>
當第一次進入該網頁,我的主頁選項卡設置爲基於href標籤內的id =「current」的電流。
我的問題是,當用戶點擊「功能」選項卡時,我如何通過jQuery,從主頁選項卡中刪除class = current並添加到功能a href標籤,以便我的功能選項卡現在顯示作爲目前的標籤等與其他人?
我也有以下的jQuery功能:
$("#home").click(function(){
$("#content").load('home.html');
});
$("#features").click(function(){
$("#content").load('features.html');
});
任何幫助將是巨大的。
謝謝。
你輸入的是「刪除id = current「,我想你的意思是,」刪除class = current「。 – Pointy 2010-03-03 13:33:50
感謝Pointy - 已更新我的帖子。 – tonyf 2010-03-03 13:52:06