I keep getting a error saying unexpected token var
on these lines
var isSplash =true;
//------DocReady-------------
$(document).ready(function()
if(location.hash.length == 0){
location.hash="!/"+$('#content > ul > li').eq(2).attr('id');
Help please im a n00b at javascript
thanks
The line itself is perfectly valid javascript. The line before it, however, is most likely not. If your interpreter is expecting a closing brace
}or closing paren)and it sees “var” instead, you will get the error messageUnexpected token: var.Check the line before the error for any syntax errors.
edit: The line before has a closing script tag as a string. The browser will see this as a closing script tag, regardless of the fact that it is in a string, and break the rest of your script.
To fix the issue, simply split your string in the middle of the closing script tag. e.g.
See this related question.