I have a series of Div
elements like this and I want to set an attribute to the last custom div (HRDIV)
. After that, I need to hide the last hrdiv
.
<div class="main">
<div id="content">
<div class="cols">
<p>Content number 1</p>
</div>
<div class="hrdiv">
<div class="cols">
<p>Content number 2</p>
</div>
<div class="hrdiv">
<div class="cols">
<p>Content number 3</p>
</div>
<div class="hrdiv">
</div>
</div>
Thank you in advance for your assistance!