Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Checkbox won't 'check' Reply To: Checkbox won't 'check'

#296458
larabrian
Participant

Also, jQuery is() method is to check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. If no element fits, or the selector is not valid, then the response will be ‘false’. This method traverses along the DOM elements to find a match, which satisfies the passed parameter.

if ($(“input[type=checkbox]”).is(“:checked”)) {
alert(“Checked”);
}