, . , querySelectorAll , .
, , , , . , , . jQuery jQuery.expr.filters.visible, $(this).is(':visible'):
$('.checkboxes' ).each(function(){
if (this.checked && jQuery.expr.filters.visible(this)) {
}
}
Please note that although this works in jQuery 1.4.4, it is not documented and may change at any time ...
As other users have already noted, do not change your mind if you do not have significant performance issues. This solution may be useful if you are.
Edit A little benchmarking suggests that if your requirement should only work with checked, visible checkboxes, my solution is about two times faster than $('.checkboxes:visible')assuming that you do not have the appropriate class.
source
share