Multi-line string insert using jQuery

Change all the double quotes for the attributes to single quotes.

$("#addSelect").click(function() { 
        $("#optionsForm").after("<tr> \
    <td><input type="text" class="optionField" value="Options" /></td> \
    <td> \
        <ul class="option"> \
            <li><select><option>Value..</option></select></li> \
        </ul> \
    </td> \
</tr>"); 
} ); 

Leave a Comment