Guest User

Untitled

a guest
Oct 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. addEvent : function(el, type, fn) {
  2. if (typeof addEventListener !== "undefined") {
  3. el.addEventListener(type, fn, false);
  4. } else if (typeof attachEvent !== "undefined") {
  5. el.attachEvent("on" + type, fn);
  6. } else {
  7. el["on" + type] = fn;
  8. }
  9. }
Add Comment
Please, Sign In to add comment