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

Matt Warden mwarden at gmail.com
Thu Jan 18 14:03:39 CST 2007


On 1/18/07, Paul Bennett <Paul.Bennett at wcc.govt.nz> wrote:
> 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.

Where's the part where you are creating the elements? No IE weirdness
seems culpable, so there's probably a small logic error in your code.

-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list