Search code examples
jqueryline-breaks

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.


Solution

  • The best way to do it would be...

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