I thought for a while that I was done with Web development. I mean the HTML, CSS, JavaScript stack specifically. WPF and Silverlight have just been so much more fun.
Well, despite that sentiment my weekends have been full for the last couple of months with HTML, CSS, and JavaScript work for Silver Arcade. Surprisingly, I have found it refreshing.
In fact, it’s even influenced my WPF development, but that’s another post.
Silver Arcade passes around a lot of data using JSON. I kept having problems with IE7 and spent too much time scratching my head.
Take a look at this little bit of jQuery that wires up the featured games rotator on the home page.
jQuery(function($) {
$('#rotator-content').cycle({
fx: 'scrollLeft',
easing: 'easeOutQuad',
speed: 1000,
timeout: 6000,
next: '#next-feature',
prev: '#prev-feature' ,
pause:1,
});
});
This code executes correctly in IE 8, Firefox 3, Safari 4, and Chrome. It breaks in IE 7. (It also works in Opera, but there are other problems there.)
The problem is the comma on the last line. IE 7 expects something more because of the comma. Specifically, the error is:
“Expected identifier, string or number”
Posted
05-03-2009 6:10 PM
by
Christopher Bennage