[thelist] [JavaScript] IE: attaching events to generated content

Paul Bennett Paul.Bennett at wcc.govt.nz
Thu Jan 18 13:49:55 CST 2007

Hi Lee,

I'm using YUI (http://developer.yahoo.com/yui/) , so my logic went something like this:

preloaders = YAHOO.util.Dom.getElementsByClassName('preload', 'img', 'body');
If(preloaders.length > 0) {
	YAHOO.util.Event.addListener(preloaders, 'mouseover', rollIt); 

IE still didn't seem to like attaching events to js-generated dom elements though.

Oh, for the new elements I was using createElement(), setAttribute() and appendChild().


More information about the thelist mailing list