I just want to remove the br tags.

```
'<div class="temp">some content<br>and more<br><a href="#"> and more content</a></div>'

$('.temp br').contents().unwrap();

```

why doesn't this work.

I also tried this as I saw it on stackoverflow but didn't work either. What am I doing wrong with both of these.

```
$('.temp').contents().filter(function() {
  return this.nodeType == 3;
}).filter('br').remove();

```