日期:2014-05-17 浏览次数:20461 次
<script>
$('#22 li span').each(function () {
$(this).click(function () {
$(this).nextAll().addClass('non');
});
});
</script>
$('#22 li span').each(function () {
if($(this).attr("id")==1)
{
$(this).click(function () {
$(this).nextAll().addClass('non');
});
}
});
------解决方案--------------------
http://topic.csdn.net/u/20100201/16/d6e5cab1-5b22-43c6-9f6b-e2700eb40ff5.html?74466
------解决方案--------------------
$(document).ready(function () {
$("#22 li span").each(function () {
$(this).nextUntil("span").backgroundColor("#ccc");
})
})