如何將border-bottom : none;
添加到活動<li>
之上的<li>
?jQuery:選擇li在活動之上
<ul>
<li>text</li> <!--this li must get the border-bottom : none then.-->
<li class="active">text</li>
<li>text</li>
</ul>
如何將border-bottom : none;
添加到活動<li>
之上的<li>
?jQuery:選擇li在活動之上
<ul>
<li>text</li> <!--this li must get the border-bottom : none then.-->
<li class="active">text</li>
<li>text</li>
</ul>
$('.active').prev('li').css('border-bottom','none');
$('li.active').prev().css('border-bottom', 'none');
你想使用jQuery的兄弟姐妹()。閱讀此信息,它很可能會對您有所幫助:http://api.jquery.com/siblings/
它不工作。這是一個jQuery新聞旋轉。所以如果你用鼠標來確定項目,它必須改變。 這裏的圖像,看看我的意思: http://www.dreamwire.nl/klanten/test.jpg – Maanstraat 2011-05-31 12:00:56
你的意思是懸停?如果是這樣,請嘗試與此結合:http://api.jquery.com/hover/ – 2011-05-31 12:09:33
是的,我現在正在工作......但是當我在ul之外時,您將再次看到邊框! – Maanstraat 2011-05-31 12:50:33