Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery find <br/> tags within div and add additional <br/> to each

Tags:

jquery

How can I use jQuery to find all the <br/> tags within a div with class "post" and add an additional <br/> tag after each?

like image 207
jetlej Avatar asked Feb 24 '23 20:02

jetlej


1 Answers

Just guessing here but I would try using the .after function like this

$('div.post br').after('<br/>');
like image 135
Amir Raminfar Avatar answered Mar 23 '23 17:03

Amir Raminfar