jquery 获取dom固定元素 添加样式的简单实例
(编辑:jimmy 日期: 2025/5/11 浏览:3 次 )
<script type="text/javascript">
xx = function(){
//$("#categories div").eq(6).css("color","#000000");
$("#categories div").eq(6).addClass("xxx");
}
</script>
<style>
.xxx{}
.xxx a{color:#ff0000;}
</style>
xx = function(){
//$("#categories div").eq(6).css("color","#000000");
$("#categories div").eq(6).addClass("xxx");
}
</script>
<style>
.xxx{}
.xxx a{color:#ff0000;}
</style>
下一篇:jquery判断元素的子元素是否存在的示例代码