Home › Forums › JavaScript › Checkbox won't 'check' › Reply To: Checkbox won't 'check'
September 26, 2019 at 12:04 am
#296458
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”);
}