Amit Amit - 5 months ago 11
jQuery Question

find first occurance of class in div

I have the below html structure, i want to find the inner html of first div with class as "popcontent" using jQuery

<div>
<div class="popContent">1</div>
<div class="popContent">2</div>
</div>

Answer

You will kick yourself..... :)

$(".popContent:first").html()