tarnfeld tarnfeld - 1 year ago 85
HTML Question

How to gain access to an element on the same level in the DOM?

<div id="dad">
<img id="mum">

With jQuery, how could i get access to the input element, get is value or set it for example? I can't work out how to access something on the same level.. and i dont want to be using ID's, just parent/child nodes so i can use the code for loads of dad div's


Answer Source
var myEl = $("#dad").children(":input");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download