• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1074
  • Last Modified:

search checkboxes checked

I'm trying to search all checkboxes checked in a certain div.  Unfortunately what's below only pulls out the checkboxes that have checked set in the markup, as opposed to what has since been checked (or unchecked) manually.  Is it possible to make this more dynamic, or is this just the nature of CSS Selectors.

var f = $$('div#cbDiv input[type="checkbox"][checked=checked]');
0
ARACK04
Asked:
ARACK04
1 Solution
 
MMDeveloperCommented:
this is untested...


var f = $$('div#cbDiv input[type="checkbox"]').reject(function (el) {return !(el.checked)});

should return an array of checkboxes inside the div#cbDiv that are checked
0
 
ARACK04Author Commented:
Perfect.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now