Lord Vermillion
Lord Vermillion

Reputation: 5424

jQuery append content on multiple code rows

I'm appending large blocks of HTML with jquery .append().

This works:

 $('#Ctabs1-pane' + index + '').append('<br /><br /><br />');

I would like this to work

$('#Ctabs1-pane' + index + '').append('<br />
<br />
<br />
');

Is this possible?

Upvotes: 0

Views: 41

Answers (2)

Ravneet
Ravneet

Reputation: 13

you can do it like this:

$('#Ctabs1-pane' + index + '').append('<br />\
<br />\
<br />\
');

you can add \ at end of every row.

Upvotes: 1

Rajaprabhu Aravindasamy
Rajaprabhu Aravindasamy

Reputation: 67217

Try to concatenate those strings,

$('#Ctabs1-pane' + index + '').append('<br />' +
'<br />' +
'<br />' 
);

Upvotes: 2

Related Questions