How to remove <br>?

How to remove <br>?

Assume the following code


  1. <a class="foobar" ....>.....</a>
  2. <br>


How do I remove the <br> tag following (all) <a> elements with class="foobar"?


The following does not work:

$("a.foobar").next().remove();


Why not?


Peter