Skip to content

Instantly share code, notes, and snippets.

@moeproblems
Created December 15, 2010 23:28
Show Gist options
  • Save moeproblems/742773 to your computer and use it in GitHub Desktop.
Save moeproblems/742773 to your computer and use it in GitHub Desktop.
$('#mouseover-top').bind('mouseenter', function(e) {
var tab = that.tabs[that.settings.tab];
var elem = $('#' + that.settings.tab + '-box');
var $this = $(this);
$('#mouseover-bottom').show();
elem.stop().animate({top: 0}, 3000, function() {
$this.hide();
tab.top = 0;
});
}).bind('mouseleave', function(e) {
var tab = that.tabs[that.settings.tab];
var elem = $('#' + that.settings.tab + '-box');
elem.stop();
tab.top = elem.css('top');
});
$('#mouseover-bottom').bind('mouseenter', function(e) {
var tab = that.tabs[that.settings.tab];
var elem = $('#' + that.settings.tab + '-box');
var $this = $(this);
$('#mouseover-top').show();
elem.stop().animate({top: (-1 * (tab.height - that.settings.height))}, 3000, function() {
$this.hide();
tab.top = elem.css('top');
});
}).bind('mouseleave', function(e) {
var tab = that.tabs[that.settings.tab];
var elem = $('#' + that.settings.tab + '-box');
elem.stop();
tab.top = elem.css('top');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment