Skip to content

Instantly share code, notes, and snippets.

@eristoddle
Created November 6, 2012 18:30
Show Gist options
  • Save eristoddle/4026566 to your computer and use it in GitHub Desktop.
Save eristoddle/4026566 to your computer and use it in GitHub Desktop.
Hover based dropdown form jquery
$('.fb-album').hover(
function () {
pf_data.fb_list_hover = false;
$('.album-list').show();
$('.album-list').hover(
function () {
pf_data.fb_list_hover = true;
$('.album-list').show();
/*$('.album-list li').click(function () {
$('.album-list').hide();
});*/
},
function () {
$('.album-list').hide();
pf_data.fb_list_hover = false;
});
},
function () {
var delay = function (time, callback) {
$.fx.step.delay = function () {};
return this.animate({
delay: 1
}, time, callback);
}
$('.album-list').delay(1000, function () {
if (!pf_data.fb_list_hover) {
$('.album-list').hide();
}
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment