I apologise if this is the wrong newsgroup for this.
I'm working on a CMS backend, and am having trouble getting IE6 to behave.
I have a large script which works perfectly in Firefox, but does not
work in IE, so I'm trying to figure it out.
The following, for example, works in Firefox:
Element.prototype.addClass=function(cl){ this.className+=' '+cl; }
Element.prototype.removeClass=function(cl){
this.className=el.className.toString().replace(eva l('/'+cl+'/'),''); }
with the above, you can create an element:
el=document.createElement('div');
and then assign a class to it arbitrarily:
el.addClass('testClass');
or remove it:
el.removeClass('testClass');
unfortunately, IE6 complains about this, saying that Element is not an
object.
Is there a simple way around this, or am I going to have to rewrite a
huge chunk to account for IE6's quirks?
Kae