Today while writing a new Mootools class an error occurred. Not a new one, I’ve had this one before.

screenshot.192

But how could this happen? Everything worked fine in Firefox en Firebug was very happy with my programming. No errors found.

This is the moment the frustration grows. You place alerts on every line of code you can imagine and there’s still no solution for this error. Well, I can recommend you to watch the comma’s. Place no comma on the wrong place or on a place where you don’t need a comma. I’ve added a comma to the last option and this is where IE is going to throw stupid errors:

var cvMenu = new Class({
	Implements: [Options],

	options: {
		duration: 500,
		delay: 1500,
		transition: Fx.Transitions.Quad.easeInOut,
	},

	/* The rest of my class */

	lastFunction: function(){

		/* Last function in the class */

	},
}

Has to be:

var cvMenu = new Class({
	Implements: [Options],

	options: {
		duration: 500,
		delay: 1500,
		transition: Fx.Transitions.Quad.easeInOut /* No comma here */
	},

	/* The rest of my class */

	lastFunction: function(){

		/* Last function in the class */

	} /* No comma here */
}

Also becarefull at the end of your class, after the last function you may not use a comma!

IE is making life great hûh?

Cheers!

Related Posts

Comments (1)

avatar

Ivo says:

IE is making many lives miserable with their inferior internet browser that doesn’t obey the general rules of programming.
Good job on solving the problem nevertheless!

Leave a Comment

Get your own Gravatar!
Your email will never be published!

Notify me of followup comments via e-mail

Top of Page