remove previous element only if it is of type <hr>?
Starting with
- <hr>
- <div class="aaa">...</div>
- ...
- <p>
- <div class="aaa">...</div>
I want to remove the previous element of <div class="aaa"> elements but ONLY if it is a <hr> element
$("div.aaa").prev().remove();
removes them all.
How can specify only <hr>-removals?