Skip to content

Instantly share code, notes, and snippets.

@danwrong
Created July 13, 2010 05:17
Show Gist options
  • Select an option

  • Save danwrong/473487 to your computer and use it in GitHub Desktop.

Select an option

Save danwrong/473487 to your computer and use it in GitHub Desktop.
function DropDownMenu(element) {
element.addEventListener('mouseover mouseout', this, false);
}
DropDownMenu.prototype = {
handleEvent: function(e) {
switch(e.type) {
'mouseover': this.open(e); break;
'mouseout': this.close(e); break;
}
},
open: function() {
},
close: function() {
}
}
var m = new DropDownMenu(menu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment