JavaScript Error ‘expected identifier, string or number’ in IE

I just can’t resist myself to blog this, as this is one of the most annoying error I found in IE.  When I was testing a Jquery Code I’m writing, Firefox worked without a hitch, but IE threw an ‘expected identifier, string or number’ error pointing to the last line of the variable declaration.

Here is the code:

var main_api = $(“div.main_scrollable”).scrollable({
mousewheel: false,
api: true,
speed: 400,
prev: “.main_prev”,
next: “.main_next”,
clickable: “true”,
});

Look at clickable: “true”, notice the comma after.  That’s what was causing the the error. I had taken out a variable under that one but forgot to remove the comma. FireFox ignored the error, but not IE. One little misplaced character, so much wasted time.   Arrrrrggg….IE!!!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.