Uncaught SyntaxError: Unexpected ILLEGAL Token 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 the console, I had:

Uncaught SyntaxError: Unexpected ILLEGAL Token

It works fine for Firefox, but not for Chrome and Chromium for Ubuntu.

+5
source share
3 answers

After });your last last line, an invisible character appears. When I put it in my editor, it appeared like ..

View your code in an editor that can display non-printable characters with some kind of character or view it in a hex editor.

+15
source

Summing up the solution to the problem with the "ILLEGAL Unexpected Token":

ILLEGAL .

HxD Editor () . , , . ( ), HEX. .

0

@TiSer: , , , , - Irishka 14 11:57

yeap, ! - JS- .:) - TiSer Oct 17 '11 8:50

$JQ ().ready(...); Chrome

jQuery script </body>

EDIT:

-1

All Articles