Reputation: 7345
$(".post").hover(function(){
$(".buttons input", this).show();
});
What's the easiest way to make the same element hide again once mouse goes off .post? I' trying to make something similar to youtube posts (buttons are shown/hidden on mouse on)
Upvotes: 0
Views: 62
Reputation: 29005
Show the markup
Based on assumption,
$(".post").hover(function(){
$(".buttons input", this).fadeIn('slow');
},
function(){
$(".buttons input", this).fadeOut('slow');
});
Upvotes: 2