How to get all child inputs of a div element (jQuery)

jquery, jquery-selectors

Solution

Use it without the greater than:

$("#panel :input");

The `>` means only direct children of the element, if you want all children no matter the depth just use a space.

Problem

HTML: ``` <div id="panel"> <table> <tr> <td><input id="Search_NazovProjektu" type="text" value="" /></td> </tr> <tr> <td><input id="Search_Popis" type="text" value="" /></td> </tr> </table> </div> ``` I need to select all inputs in the particular div. This's not working: ``` var i = $("#panel > :input"); ```

Original source