开发者

how to group multiple filter selectors?

How can I select first checked checkbox from div with class "site"?

I guess it should be 开发者_开发知识库something like that but this doesnt work:

$(".site :checkbox :checked :first")


remove the spaces

$(".site :checkbox:first:checked")


Use $('.site input:checkbox:checked:first")

It searches for input tags that are checked checkboxes below .site and then returns the first element that matches these criteria.


$(".site input[type='checkbox']:checked:first")

Demo: http://jsfiddle.net/TRAk2/

Use the Attribute Equal Selector to select the type of an input.


$(".site :checkbox")[0].checked);

Demo: http://jsfiddle.net/nyus6/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜