[thelist] removeAttribute('class') not working in IE

Iain iain at firelightning.com
Tue Sep 20 15:13:32 CDT 2005


Hi guys,

Perplexing, but while Mozilla and Firefox both faithfully perform the following, IE seems to take offense:

	if (currentImage.className == 'smallPic')
	{
		imageDivision.className = 'smallPic';
		currentImage.removeAttribute('class');
	}

To cut a long story short, currentImage is later appended to imageDivision which is, in turn, appended to the main document.  Viewing the generated source from IE reveals that both the new division and the nested image both have the class attribute.  Can anyone suggest why this might be happening?  Is it a known bug or a 'feature'?

Thanks,

Iain :)




More information about the thelist mailing list