Skip to content

Instantly share code, notes, and snippets.

@netdesign
Forked from anonymous/gist:1986367
Created March 6, 2012 14:19
Show Gist options
  • Save netdesign/1986515 to your computer and use it in GitHub Desktop.
Save netdesign/1986515 to your computer and use it in GitHub Desktop.
this.e = function(e,cb){
var that=this,resolvedCb=function(event){cb.call(that,event)};
if(window.addEventListener){ // ALL
this.bj.addEventListener(e,resolvedCb,false);
}
else if(window.attachEvent){ // IE
this.bj.attachEvent(e,resolvedCb);
}
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment