domino
domino

Reputation: 7345

jquery hover similar to youtube buttons

 $(".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

Answers (1)

Jashwant
Jashwant

Reputation: 29005

Show the markup

Based on assumption,

$(".post").hover(function(){
      $(".buttons input", this).fadeIn('slow');
},
function(){
 $(".buttons input", this).fadeOut('slow');
});

Upvotes: 2

Related Questions