3zzy 3zzy - 1 year ago 96
jQuery Question

Removing all line-breaks (BRs)

I'd like to remove all

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

Answer Source

The best way to do it would be...

$('#id p br').remove();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download