stages = {
"1": {
id: "1",
div: "foo"
},
"2": {
id: "2",
div: "bar"
},
"3": {
id: "3",
div: "foobar"
}
};
When I run this in Firefox, it’s fine. But when run in IE8, I get this error:
Message: Object doesn’t support this property or method
Is this a known bug / is there a workaround or is it my syntax?
If there is an element with
id=stagesin your markup, some browsers create global variablestagesas a reference to it. However, IE doesn’t support overriding it without declaring it. If you wantstagesvariable to be global, putvar stages;to global scope or assign the object towindow.stages.