jQuery的选择所有BR与显示:无; [英] jquery select all br with display:none;

查看:81
本文介绍了jQuery的选择所有BR与显示:无;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据CSS选择一个元素?

How do I select an element based on its css?

我需要选择一个带有内联样式显示的br:无.这与br:hidden不同,因为它会选择以其他方式隐藏的元素,而我不希望那样.

I need to select a br with inline style display:none. This is not the same thing as br:hidden, because that selects elements that are hidden in other ways, and I don't want that.

谢谢.

推荐答案

您可以尝试:

$("br").filter(function() { return $(this).css("display") == "none" })

这篇关于jQuery的选择所有BR与显示:无;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆