Javascript cross browser attach event

From Code Trash
Jump to: navigation, search
if (!window.addEventListener) {
 
    window.addEventListener = function (type, listener, useCapture) {
 
        attachEvent('on' + type, function() { listener(event) });
 
    }
}

or the equivalent jquery example would be like the following

     $('#iframeid').load(function() {})

The above is for iframe onload.