jQuery find() Method

Last Updated:

jQuery find() Method

The jQuery find() method returns descendant elements of matched elements, filtered by a selector, jQuery object, or element.

Example

HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery find() Method</h1> <p>This is <span>paragraph1</span></p> <p>This is paragraph2</p> <script> $(document).ready(function(){ $("p").find("span").css("color", "red"); }); </script> </body> </html>

Syntax

$(selector).find(elem);

Parameter Values

Value Type Explanation
elem Required Specifies a child element / selector to be found.

Browser Support

Devicedesktopmobile
Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet
find()YesYesYesYesYesYesYesYesYesYesYesYesYes

Share this Page

Meet the Author