How to Search Child Element inside Parent Elements in JQuery

You want to search child elements nested inside any parent element. You can use JQuery find method as shown below:

Let's say you have following parent and child elements in HTML

<div id="parent"> 
   <span id="child">I am child</span> 

You can use find method as follows:


There are some other shortcuts to access the child elements in JQuery such as given below:

$("#child", $("#parent"));


$("#child", "#parent");



About author

User avatar

Waqas Anwar

Founder of, Senior Consultant, Microsoft .NET and Web Technologies