here Html given below
<div class="navBulletsWrapper">
<div rel="0" class=""></div>
<div rel="1" class=""></div>
<div rel="2" class=""></div>
<div rel="3" class=""></div>
<div rel="4" class="active"></div>
<div rel="5" class=""></div>
<div rel="6" class=""></div>
<div rel="7" class=""></div>
</div>
i want to get rel value of div having class active
tried
$('.navBulletsWrapper .active')[0].attr('rel')
but fails because div doesn`t have attr
$('.navBulletsWrapper .active')[0]will give you a DOM object, not a jquery object; thus, it won’t have any jquery function likeattrattached to it.should work.
if you only have one
.activediv at a time, you dont have to useeq(0)