How do I select the element with id = datepicker which is nested as shown below?
<div id="section_update">
<div class="demo">
<p>Date: <input type="text" id="datepicker"></p>
</div>
</div>
Please suggest me a way to do this. Thank you.
I think you refer to ‘nested’ because you may have duplicated ids (you shouldn’t, but…)
So, to select it just do:
This will select the element with
id="datepicker"that is inside#section_updateHope this helps. Cheers