A way to chain selectors like this in jQuery? input:checked:not(:hidden)

[亡魂溺海] 提交于 2019-12-24 08:35:33

问题


I want to get all inputs that are checked and not hidden

This doesn't work:

.formyform input:checked:not(:hidden)

Is there a simple way to do it?

I couldn't find any example on the jQuery site


回答1:


What you have should work, though you can simplify it with :visible:

.formyform input:checked:visible

You can test it out here.



来源:https://stackoverflow.com/questions/3835486/a-way-to-chain-selectors-like-this-in-jquery-inputcheckednothidden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!