Skip to content

Instantly share code, notes, and snippets.

Created August 23, 2010 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/546282 to your computer and use it in GitHub Desktop.
Save anonymous/546282 to your computer and use it in GitHub Desktop.
var Card = new Class({
Implements: [Options, Events],
options: {
index: 0,
bg: null,
onMouseenter: doRollOver,
onMouseleave: doRollOut
},
initialize: function(options){
this.setOptions(options);
},
doRollOver: function(){
alert("over");
},
doRollOut: function(){
alert("out");
}
});
window.addEvent('domready', function(){
$$('.card').each(function(element, index){
element = new Card({
index: index,
bg: element.getChildren('.cardBG')
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment