Assuming i have a dvMainDiv as shown bellow with multiple children of type divs aswel. Now in my software the children have been added programmatically. Assuming the html is as shown below, how do get a child dive with a specific data-id.
<div id="dvMainDiv" class="dvMainDiv">
<div id="dvChildDiv" class="dvChildDiv" data-id="1">
<p>
some text
<p>
</div>
<div id="dvChildDiv" class="dvChildDiv" data-id="2">
<p>
some text 2
<p>
</div>
</div>
Say for instance, i want to get only the div with data-id of 1 and not 2, how do i do this in jquery.