Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c.ui.hover = function(element, over, out, delay){
- var timer;
- $(element).hover(function(){
- if (timer) {
- clearTimeout(timer);
- timer = null;
- } else {
- over.apply(this, arguments);
- }
- }, function(){
- var that = this,
- args = $.makeArray(arguments);
- timer = setTimeout(function(){
- out.apply(that, args);
- timer = null;
- }, delay);
- });
- }
Add Comment
Please, Sign In to add comment