KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How I can get the last element (hr) from the following code: <div> <div> <span class="hr"></span> </div> <div> <span class="hr"></span> </div> <div> <span class="hr"></span> <!-- I need this --> </div> </div> .hr:last-child doesn't work for this. Of course, DOM structure could be more complicated. I just need to fetch the last needed element.
Tags (comma-separated)
Save Edits
Cancel