Hi Everyone,
I have a bunch of DIV's that all have the same class and style except for 1.
<div id="0" class="divpage" style="display:none"></div> <div id="1" class="divpage" style="display:none"></div> <div id="2" class="divpage" style="display:none"></div> <div id="3" class="divpage" style="display:none"></div> <div id="4" class="divpage" style="display:block"></div> <div id="5" class="divpage" style="display:none"></div> <div id="6" class="divpage" style="display:none"></div>I need to find out the id of the div that is 'display:block'. I used the following code but it only returns the first div's id.
var num = $(".divpage").attr("id");How do I modify this to find the correct id?
Thanks in advance.