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.
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.
Summing up the solution to the problem with the "ILLEGAL Unexpected Token":
ILLEGAL .
HxD Editor () . , , . ( ), HEX. .
@TiSer: , , , , - Irishka 14 11:57yeap, ! - JS- .:) - TiSer Oct 17 '11 8:50
@TiSer: , , , , - Irishka 14 11:57
yeap, ! - JS- .:) - TiSer Oct 17 '11 8:50
$JQ ().ready(...); Chrome
jQuery script </body>
EDIT: