3zzy 3zzy - 1 month ago 12
jQuery Question

Removing all line-breaks (BRs)

I'd like to remove all

<br/>
<br />
or
<br>
tags from
#id p
. I tried
$('#id p').find('br').remove();
but it doesn't seem to work.

Answer

The best way to do it would be...

$('#id p br').remove();
Comments