JavaScript has quite a few "unused" (well many are used in the upcoming versions) keywords. You can't use these words as keys without putting quotes around them. List of keywords here:
http://www.quackit.com/javascript/javascript_reserved_words.cfm Karl Rudd On Thu, Jul 10, 2008 at 6:45 AM, cj5 <[EMAIL PROTECTED]> wrote: > > Don't know if this is been addressed here, yet, but I discovered a > really tedious syntax issue with IE and the css() method in JQuery. > Basically, this error never comes up in Firefox or any Mozilla-based > browser for that matter, but in IE JavaScripts will fail when you do: > > $('div').css({class: 'my-class-name'}); > > You simply need to make sure that class is enclosed in quotes > > $('div').css({'class': 'my-class-name'}); > > I would guess that IE reserves "class" in javascript, so it just bombs > out when included in an object. >