{"id":8095,"date":"2015-11-02T16:15:21","date_gmt":"2015-11-02T14:15:21","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=8095"},"modified":"2017-12-21T15:49:28","modified_gmt":"2017-12-21T13:49:28","slug":"jquery-find-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/","title":{"rendered":"jQuery Find Example"},"content":{"rendered":"<p>In this example we&#8217;re going to talk about the <code>.find()<\/code> method of jQuery.<\/p>\n<p>What this method does is kind of self-explanatory, it gets the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. A descendant is a child, grandchild, great-grandchild, and so on.<\/p>\n<p>It has only one argument, which is obviously required in order to make possible element matching and apply the desired methods afterwards.<\/p>\n<p>No matter where the element we want is found, the method will traverse downwards along descendants of DOM elements, all the way down to the last descendant.<br \/>\n[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<h2>1. Document Setup<\/h2>\n<p>To begin, create a new HTML document and add the following basic syntax inside:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;jQuery Find Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\n\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script src=\"jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\n\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Note that the jQuery library is linked locally. To download it, please go <a href=\"https:\/\/jquery.com\/download\/\" target=\"_blank\">here<\/a>.<\/p>\n<h2>2. Basic Method Application<\/h2>\n<p>In order to apply the method, first get to know the basic syntax: <code>$(selector).find(filter);<\/code><\/p>\n<p>Let&#8217;s add a ul element in HTML and some other elements inside like <code>h3<\/code>, <code>p<\/code>, and <code>li<\/code>.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;ul&gt;\r\n    &lt;li&gt;List Item&lt;\/li&gt;\r\n    &lt;h3&gt;Level Three Heading&lt;\/h3&gt;\r\n    &lt;p&gt;Lorem ipsum dolor sit amet.&lt;\/p&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>In the JS section, select the ul element and apply the <code>.find()<\/code> method specifying <code>\"h3\"<\/code> as a filter.<\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function(){\r\n$(\"ul\").find(\"h3\").css({\r\n    \"color\":\"red\",\r\n    \"border\":\"1px solid red\",\r\n    \"padding\":\"5px\",\r\n    \"width\":\"20%\"\r\n   });\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>As you can see, we&#8217;ve applied some styling to the selected element. The result would be:<br \/>\n<figure id=\"attachment_8102\" aria-describedby=\"caption-attachment-8102\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-1.jpg\" alt=\"A Basic Application of the Method!\" width=\"820\" height=\"171\" class=\"size-full wp-image-8102\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-1-300x63.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-8102\" class=\"wp-caption-text\">A Basic Application of the Method!<\/figcaption><\/figure><\/p>\n<h2>3. Cases and Examples<\/h2>\n<p>The following examples will all have the same HTML that we will declare here:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;body class=\"all\"&gt;body (great-grandparent)\r\n&lt;div style=\"width: 500px;\"&gt;div (grandparent)\r\n    &lt;ul&gt;ul (parent)\r\n        &lt;li&gt;li (child)\r\n            &lt;span&gt;span (grandchildren)\r\n                &lt;h4 class=\"chosen\"&gt;h4 (great-grandchildren)&lt;\/h4&gt;\r\n            &lt;\/span&gt;\r\n        &lt;\/li&gt;\r\n        &lt;li&gt;li (child)\r\n            &lt;span&gt;span (grandchildren)&lt;\/span&gt;\r\n        &lt;\/li&gt;\r\n    &lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n<\/pre>\n<p>Here, we have created a hierarchy representation of various elements which will be used to refer or filter to, in three different cases.  Note that the layout has changed, the <code>body<\/code> tag is now inside the HTML section and the JS section has been moved apart right after <code>head<\/code>.<\/p>\n<p>Also, to make this a little more noticable let&#8217;s also style the boxes of these elements:<\/p>\n<pre class=\"brush:css\">\r\n&lt;style type=\"text\/css\"&gt;\r\n.all* {\r\n    display: block;\r\n    border: 2px solid lightgrey;\r\n    color: lightgrey;\r\n    padding: 5px;\r\n    margin: 15px;\r\n}\r\n&lt;\/style&gt;\r\n<\/pre>\n<p>What we have created is:<br \/>\n<a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-4.jpg\" alt=\"find-4\" width=\"820\" height=\"457\" class=\"aligncenter size-full wp-image-8112\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-4-300x167.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>3.1 Return Multiple Descendants<\/h3>\n<p>Whenever you want to find several descendants you can simply separate selectors with commas, and include either tags or classes\/id&#8217;s like so:<\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function(){\r\n    $(\"body\").find(\"div, .chosen, li\").css({\r\n        \"color\":\"red\",\r\n        \"border\":\"2px solid red\"\r\n    });\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result is linked to the HTML we defined before, so all <code>div<\/code>s, <code>li<\/code>st items and elements with a class of <code>\".chosen\"<\/code> would be selected and applied the css styles of red border and text color:<br \/>\n<figure id=\"attachment_8107\" aria-describedby=\"caption-attachment-8107\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-2.jpg\" alt=\"Returning Multiple Descendants\" width=\"820\" height=\"457\" class=\"size-full wp-image-8107\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-2-300x167.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-8107\" class=\"wp-caption-text\">Returning Multiple Descendants<\/figcaption><\/figure><\/p>\n<h3>3.2 Return all descendant elements of &lt;html&gt;<\/h3>\n<p>In addition to selecting one or more HTML elements using the <code>.find()<\/code> method, you may as well want to select all of them. This can be done by specifying the syntax <code>*<\/code> of an asterisk inside the brackets.<\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function(){\r\n    $(\"body\").find(\"*\").css({\r\n        \"color\":\"red\",\r\n        \"border\":\"2px solid red\"\r\n    });\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result would show every single box selected (red color of text and red border color):<br \/>\n<figure id=\"attachment_8110\" aria-describedby=\"caption-attachment-8110\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-3.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-3.jpg\" alt=\"Returning all descendant elements of \" width=\"820\" height=\"457\" class=\"size-full wp-image-8110\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-3-300x167.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-8110\" class=\"wp-caption-text\">Returning all descendant elements of<\/figcaption><\/figure><\/p>\n<h3>3.3 Filter the Selection with a given jQuery Collection or Element<\/h3>\n<p>As of jQuery 1.6, we can also filter the selection with a given jQuery collection or element. We can do that like so:<\/p>\n<pre class=\"brush:js\">\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function(){\r\nvar allSpan = $(\"span\");\r\n    $(\"body\").find(allSpan).css({\r\n        \"color\":\"red\",\r\n        \"border\":\"2px solid red\"\r\n    });\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>As you can see, we&#8217;ve declared a variable which will reference all <code>span<\/code> elements when required. Then, we added the variable name as the argument of the method. The result would show only span elements having the CSS styles applied:<br \/>\n<figure id=\"attachment_8114\" aria-describedby=\"caption-attachment-8114\" style=\"width: 820px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-5.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-5.jpg\" alt=\"Filter the Selection with a given jQuery Collection or Element\" width=\"820\" height=\"457\" class=\"size-full wp-image-8114\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-5.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/find-5-300x167.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption id=\"caption-attachment-8114\" class=\"wp-caption-text\">Filter the Selection with a given jQuery Collection or Element<\/figcaption><\/figure><\/p>\n<h2>4. Conclusion<\/h2>\n<p>To conclude, given a jQuery object that represents a set of DOM elements, the <code>.find()<\/code> method allows us to search through the descendants of these elements in the DOM tree and construct a new jQuery object from the matching elements. The <code>.find()<\/code> and <code>.children()<\/code> methods are similar, except that the latter only travels a single level down the DOM tree.<\/p>\n<h2>5. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/10\/jQuery-Find.zip\"><strong>jQuery Find<\/strong><\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example we&#8217;re going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. A descendant is a child, grandchild, great-grandchild, and so on. It has &hellip;<\/p>\n","protected":false},"author":75,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-8095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery Find Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"In this example we&#039;re going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery Find Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"In this example we&#039;re going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-02T14:15:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-21T13:49:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"jQuery Find Example\",\"datePublished\":\"2015-11-02T14:15:21+00:00\",\"dateModified\":\"2017-12-21T13:49:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\"},\"wordCount\":608,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\",\"name\":\"jQuery Find Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2015-11-02T14:15:21+00:00\",\"dateModified\":\"2017-12-21T13:49:28+00:00\",\"description\":\"In this example we're going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery Find Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery Find Example - Web Code Geeks - 2026","description":"In this example we're going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery Find Example - Web Code Geeks - 2026","og_description":"In this example we're going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-11-02T14:15:21+00:00","article_modified_time":"2017-12-21T13:49:28+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"jQuery Find Example","datePublished":"2015-11-02T14:15:21+00:00","dateModified":"2017-12-21T13:49:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/"},"wordCount":608,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/","name":"jQuery Find Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2015-11-02T14:15:21+00:00","dateModified":"2017-12-21T13:49:28+00:00","description":"In this example we're going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-find-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery Find Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/8095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=8095"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/8095\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=8095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=8095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=8095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}