Am wondering how can we select 2nd p tag of a div.
html
<div id="my_div">
<p>
<label>aaaa</label>
<label>aaaa</label>
<label>aaaa</label>
</p>
<p>
<label>aaaa</label>
<label>aaaa</label>
<label>aaaa</label>
</p>
<p>
<label>aaaa</label>
<label>aaaa</label>
<label>aaaa</label>
</p>
</div>
what i tried.
jQuery("#my_div :nth-child(2)").attr('style','width: 50%;');
this works but it also select p
tag 2nd <label>
but am only interested in parent p tag do not want to touch p tag childs. So any idea how to do it.