Uncaught SyntaxError: Unexpected token ILLEGAL
31,722
You probably have embedded illegal characters. Look in your JS with a hex editor and look for any characters that aren't visible ASCII characters. They may be getting stripped off by JSfiddle
See Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL
Author by
Nadim Dayoub
Updated on May 20, 2020Comments
-
Nadim Dayoub almost 4 years
Possible Duplicate:
Unexpected token ILLEGAL in webkitI wrote a simple script for a hover over effect here http://jsfiddle.net/paDmg/368/ for this site http://avuedesigns.com/new/ - It works on jsfiddle, but I am getting
Uncaught SyntaxError: Unexpected token ILLEGAL
in my JavaScript when I put it live. It's on line 29 it is telling me which is the closing marks });
$('#hover-grid .indiv-cell').hover(function() { //set variables to current cell attributes var cellHeader = $(this).attr('data-hoverheader'); var cellText = $(this).attr('data-hovertext'); var replacementImg = $(this).find('a img').attr('data-replacementimg'); var oringinalImg = $(this).find('a img').attr('src'); //save original image to data variable $(this).data('origImg', oringinalImg); //add remove classes $('#hover-grid .indiv-cell').removeClass('newClass'); $(this).addClass('newClass', 1000); $(this).find('a img').hide().attr('src', replacementImg).fadeIn(300); $('.master-cell h1').hide().text(cellHeader).fadeIn(300); $('.master-cell p').hide().text(cellText).fadeIn(300); //return false; }, function() { $(this).find('a img').hide().attr('src', $(this).data('origImg')).fadeIn(10); });
-
Nadim Dayoub over 11 yearsThanks, removed the last line and retyped it and no more error. Now I got to figure out why it is not working now...