0

I am getting an error, unless I put all the html on one line, which I don't want to do.

$(this).closest('tr').after(
    '<tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>'
);
dezman
  • 16,081
  • 9
  • 51
  • 87
  • Check this question to see how to break a string in several lines without concatenation: http://stackoverflow.com/questions/508269/how-do-i-break-a-string-across-more-than-one-line-of-code-in-javascript – fableal Mar 06 '13 at 18:13

1 Answers1

0
$(this).closest('tr').after(
    '<tr> \
        <td></td> \
        <td></td> \
        <td></td> \
        <td></td> \
        <td></td> \
        <td></td> \
        <td></td> \
        <td></td> \
    </tr>'
);
dezman
  • 16,081
  • 9
  • 51
  • 87