Thursday, July 26, 2012

jquery – Javascript SyntaxError: Unexpected identifier



I wrote some small script, but since I did it with Google help I need some advice. After putting this into Chrome console, I\’m getting this error:



SyntaxError: Unexpected identifier



Here is my code:



jQuery(document).ready(function(){
if jQuery(\"#colorbox\").css(\"display\", \"none\");) {
jQuery(\"#close-news\").css(\"display\", \"none\");
}
else {
jQuery(\"#close-news\").css(\"display\", \"visible\");
}
});


Any ideas what\’s wrong?






Rating: 4 out of 5 based on 3 ratings



The post jquery – Javascript SyntaxError: Unexpected identifier appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/jquery-javascript-syntaxerror-unexpected-identifier.html

No comments:

Post a Comment