user1683645
user1683645

Reputation: 1579

string literal is not properly closed by a matching quote

I'm struggling getting rid of the error on line 2.

enter image description here

What am I doing wrong?

Upvotes: 0

Views: 3749

Answers (1)

James Allardice
James Allardice

Reputation: 165971

You need to escape the first new line character (after the opening double quote):

$("#insert-rated-category"+voteit).html(" \
    <select id='' name=''> \
        <option value=''></option> \
    </select> \
");

Edit

You'll have to escape the new line character in blank lines too. Thanks @cHao.

Upvotes: 7

Related Questions