Skip to content

Replies

0
rahul kumar
rahul kumar answered on Sep 26, 2019 7:09 AM

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");
}