user1690197
user1690197

Reputation: 43

Add line break after <p> tag using Javascript/jquery

I need a script that puts a line break after the "p" tag. I would do it manually in the html but the paragraphs are dynamically added to the site by tumblr.

Basically my code is :

 <div class="title"><a>{Caption}</a></div>

Where it says caption tumblr replaces with a real caption and i need to add line breaks between the "p" tags using javascript/jquery.

Upvotes: 1

Views: 4228

Answers (2)

Vlad
Vlad

Reputation: 978

CSS margin would be good here.

.title p {margin-bottom:10px}

Upvotes: 2

adeneo
adeneo

Reputation: 318182

$('.title a p').after( '<br />' );

FIDDLE

Upvotes: 3

Related Questions