How to get only direct child elements by jQuery function
You can use find()
:
tbl.find("> tbody > tr")
As @jave.web mentioned in the comments
To search through the direct children of an element use .children()
. It will only search through the direct children and not traverse any deeper. http://api.jquery.com/children/