当前位置: 移动技术网 > IT编程>开发语言>JavaScript > jquery slibings选取同级其他元素的实现代码

jquery slibings选取同级其他元素的实现代码

2018年09月18日  | 移动技术网IT编程  | 我要评论

代码如下:


<script type="text/javascript">
$(function(){
    $("#downloadchartsright .chartstitleopt,#downloadchartsleft .chartstitleopt").click(function(){
        $(this).siblings().removeclass('underline').end().addclass('underline');
    });
})
</script>



\

比如点击“今日排名”“本周排名”“本月排名”显示底部下划线,可以通过以上jquery代码显示隐藏样式。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网