avi avi - 1 year ago 129
Javascript Question

Uncaught SyntaxError: Unexpected token in Javascript

I am trying to insert hyperlink to my survey i am getting this error in this line var myspan1 = $(“span[title=’Laptop’]”);

Answer Source

Use single and double quotes properly. Try this

$(document).ready( function() {
    var myspan1 = $("span[title='Laptop']");
    myspan1.append("<a target='_blank' style='vertical-align:middle;color:#0072c6'  href='@http://doc/IT/IT%20Library/SP_UAT%20Server%20and%20Services%20Error.PNG'> <b>[Show]</b></a>");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download