复制代码 代码如下:
复制代码
<script type="text/javascript">
$(function(){
$("#downloadchartsright .chartstitleopt,#downloadchartsleft .chartstitleopt").click(function(){
$(this).siblings().removeClass('underline').end().addClass('underline');
});
})
</script>
<script type="text/javascript">
$(function(){
$("#downloadchartsright .chartstitleopt,#downloadchartsleft .chartstitleopt").click(function(){
$(this).siblings().removeClass('underline').end().addClass('underline');
});
})
</script>

比如点击“今日排名”“本周排名”“本月排名”显示底部下划线,可以通过以上jquery代码显示隐藏样式。
最后
以上就是会撒娇银耳汤最近收集整理的关于jquery slibings选取同级其他元素的实现代码的全部内容,更多相关jquery内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复