Assume I have a body such as;
<div class="body">
<ul>
<li class="01">hi</li>
<li class="02">bye</li>
<li class="03">go</li>
</ul>
<ul style="">
<li class="01">hi2</li>
<li class="02">bye2</li>
<li class="03">go2</li>
</ul>
</div>
I want to get each class = "01", class = "02" and class = "03"
values of each ul
.
What I did so far?
$('.body ul').each(function(element)
{
console.log(this);
});
It printed the each li element but how can I reach the values in class 01,02 and 03?
I want to get
hi bye go hi2 bye2 go2
while looping inside the body