I have a sequence of divs like the ones below.
<div class="upage" id="id01">
<div class="main" id="id02">
<div class="main2" id="id03">
</div>
</div>
</div>
I need to get the id of the class that is above in this case should return id01
.
I use parents(".upage");
but it comes to me with a pointer to the whole div. I just need to get the ID.
How to do it?