From the jQuery mailing list:
In IE the innerHTML property for a select element is readonly, so we
have to stick to createElement or the Option constructor here…
Oh, so THAT’S why I threw away three hours of my life this weekend.

IE7 is a steaming pile of crap
From the jQuery mailing list:
In IE the innerHTML property for a select element is readonly, so we
have to stick to createElement or the Option constructor here…
Oh, so THAT’S why I threw away three hours of my life this weekend.
Sorry, the comment form is closed at this time.
I too have to deal with cross-browser crap like this on a daily basis. Two great resources are http://www.quirksmode.org/ and the O’Reilly Dynamic HTML book http://www.oreilly.com/catalog/9780596527402/index.html
Comment by Victor — August 5, 2007 @ 4:53 pm
What gets me is that we were supposed to be beyond all this garbage. Not only that, but jQuery is also supposed to be a cross-platform Javascript framework. And in this particular case it actually did its job properly—IE7 and the Developer Toolbar in IE7 were showing two different states. How on earth does something like that even happen? It’s the same damned program!
Anyways, Quirksmode is great but I think PPK’s stopped updating it; there’s not much on the IE7 era in there, though I guess for the Javascript stuff you could easily insert “see IE6″ and be done with it.
Comment by Wesley — August 5, 2007 @ 4:58 pm