jQuery is() Method Last Updated : 07 Jul, 2023 Suggest changes Share Like Article Like Report The is() method is used to check if one of the selected elements matches the selectorElement Syntax: $(selector).is(selectorElement, function(index, element))Parameters: This method accepts parameters above mentioned and below described:- selector: It is an optional parameter. It specifies the selector from which the event will remove.selectorElement: It is a required parameter that specifies a selector expression, element, or jQuery object to match the current set of elements against. It returns true if there is at least one match from the given argument, and false if not.function(index, element): It is an optional parameter that specifies a function to run for the group of selected elements. index: the index position of the elementelement: the current element (the "this" selector can also be used) The below example illustrate the is() method in jQuery: Example: html <!DOCTYPE html> <html> <head> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("p").click(function () { if ($("p").parent().is("div")) { alert("Parent of p is div"); } }); }); </script> </head> <body> <center> <h1>GeeksforGeeks</h1> <div> <p>Click me to find out if I my parent is a div element. </p> </div> </center> </body> </html> Output: P pp_pankaj Follow Article Tags : Web Technologies JQuery jQuery-Methods Explore jQuery Tutorial 8 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like