Example:
<div id="parent">
<div id="1" style="display:block"></div>
<div id="23" style="display:block"></div>
<div id="42" style="display:block"></div>
<div id="32" style="display:none"></div>
</div>
According to this example i want to get the id of div id=42 which is at the second last position. i want to find div which is display block and find from last.
In your case u can use: