Making hover work.
Making hover work.
var hovers = { hoverAdd: function(object) {
$(object).addClass("tmpExampleOver");
},
hoverRemove: function(object) {
$(object).removeClass("tmpExampleOver");
}
};
$(function() {
$("div").hover(hovers.hoverAdd(this), hovers.hoverRemove(this));
});
I am trying to pass the hover functions instead of defining the functions inside the hover method. Cant get it to work.
Help appreciated.