Mob: 07760

ee-web thinks... a bit

Go on, make my day ... leave a comment

jQuery – IE7

November 15th, 2010 by Edward

I was creating a application that animated an image as you rolled over it. It was working fine in Safari (PC/Mac), FF, Opera, IE8, Chrome. But IE7 wasn’t working. Here’s part of the erronous code – much simplified –

$(currentLink).next().css ({
‘background-position’:’0 0′,

The error is simple – when creating a list of “Attribute pairs” like this, IE7 will throw a wobble if the last one, has a comma at the end – and in fact, if you think about it, semmantically its probably correct. All the other browsers that I tested kind of ignor this (which is very kind I guess!)

So, for the last line replace with


And Bob’s your uncle.


Edward owns and runs ee-web design and has been building websites for over 12 years. He is passionate about... most things really

Was this post helpful or interesting? Spread the news.

Leave a comment