X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=jquery%2Fjquery.js;h=7577936580e49ec4de4d588e286fe9409c4cdfd2;hb=9e27d8d1b4d5a93ef4107aab5e815a2c24ed899d;hp=3e7ffa67d688b717d1286d2df514f2bb21fc9047;hpb=d9b1d3436aac059ff2cdddb89f4b8fdc260366e1;p=jquery.git diff --git a/jquery/jquery.js b/jquery/jquery.js index 3e7ffa6..7577936 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -778,7 +778,12 @@ $.event = {}; // Bind an event to an element // Original by Dean Edwards $.event.add = function(element, type, handler) { - if ( element.location ) { element = window; } // Ughhhhh.... + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( $.browser == "msie" && typeof element.setInterval != "undefined" ) { + element = window; + } + if (!handler.$$guid) { handler.$$guid = $.event.add.guid++; } if (!element.events) { element.events = {}; } var handlers = element.events[type];