如何将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