Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught SyntaxError: Unexpected token ILLEGAL for Chrome Browser

toggle.js

var $jq = jQuery.noConflict();
$jq(document).ready(function(){

    $jq('.isAdd').hide();

    $jq("#Add_category").change(function(){          
        var value = $jq("#Add_category option:checked").val();
        var theDiv = $jq(".isAdd");

        theDiv.slideToggle("slow");
    });
});​

In console I had:

Uncaught SyntaxError: Unexpected token ILLEGAL

For Firefox it's works fine, but not for Chrome and Chromium for Ubuntu.

like image 361
TiSer Avatar asked Oct 14 '11 06:10

TiSer


1 Answers

There is an invisible character following the last }); of your last line. When I pasted it into my editor, it appeared as a ..

View your code in an editor capable of displaying non-printable characters with some kind of symbol, or view it in a hex editor.

like image 71
Michael Berkowski Avatar answered Oct 04 '22 03:10

Michael Berkowski