Question

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?

Was it helpful?

Solution

Try to concatenate those strings,

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

OTHER TIPS

you can do it like this:

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

you can add \ at end of every row.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top