Permalink
Browse files

Added 'over' and 'out' callbacks.

  • Loading branch information...
1 parent ebb2042 commit a3742442bc8d6afd6c41e49f03df1f84eece9b8f @bganicky bganicky committed Mar 8, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 jquery.hoverpulse.js
View
@@ -49,7 +49,7 @@ $.fn.hoverpulse = function(options) {
left: ('-'+opts.size+'px'),
height: (h+2*opts.size_y)+'px',
width: (w+2*opts.size)+'px'
- }, opts.speed);
+ }, opts.speed, opts.over);
},
// hover out
function() {
@@ -64,6 +64,7 @@ $.fn.hoverpulse = function(options) {
width: (w+'px')
}, opts.speed, function() {
$this.parent().css('z-index', opts.zIndexNormal);
+ opts.out.call(this);
});
}
);
@@ -74,7 +75,9 @@ $.fn.hoverpulse.defaults = {
size_y: 0,
speed: 200,
zIndexActive: 100,
- zIndexNormal: 1
+ zIndexNormal: 1,
+ over: $.noop || function() {},
+ out: $.noop || function() {}
};
})(jQuery);

0 comments on commit a374244

Please sign in to comment.