开发者

The opposite of this jquery function

I've been using a bit of jquery in my asp.net project and are trying 开发者_开发知识库to select all unchecked checkboxes that match a certain style class - and this 1st bit works fine.

$('span.cbmac input:not(:checked)').each(function() {";
//etc
});

I would like to use the opposite of this query, ie select all checked boxes that match the span tag cb.mac.

I've tried

!$('span.cbmac input:is(:checked)').each(function() {";
//etc
});

and a few variations but no luck so far, any ideas appreciated.


Any selector is an implied :is(). You would use span.cbmac :input:checked.


Try this-

$('span.cbmac input:checked)').each(function() {;
//etc
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜