Contact

If you like a new Web or Desktop
application, update a existing one
or add new modifications. Your at
the right place and hit the
hire me button

Follow

If your intersted you can follow
me on Twitter by clicking here

Web and Apps Building Refernce World Wild Web UNIX Apps AND Tips Programming languages

How to find a child element

We often need to find a particular element that is contained within our selected item. This is accomplished with the .children() method. This method returns an array of all the immediate children for an item. The results can be filtered by passing a selector to the method. So, imagine we had the ID for a table row, and we wanted to see the value of the table cell that had the class of "total".

$("#theRow").children("td.total");

If needing to find a child of a child, you'll need to call children multiple times, or use the .find() method.

$("#theRow").children("td").children("div.total");
OR
$("#theRow").find("td > div.total");