Darren Head
Darren Head

Reputation: 67

Simple fadeIn fadeOut on hover div

I'm new to jQuery and am really struggling with this one. I've read some past posts and tried to figure it out myself but still stuck.

Basically I would like a fadeIn effect on a child when entering a parent div and a fadeOut effect on the child when leaving the parent. At the moment, it fade's in fine, but when I enter the child div that suddenly fades out.

See my fiddle for more info.

Any info sent on is much appreciated.

Upvotes: 0

Views: 7604

Answers (1)

Kundan Singh Chouhan
Kundan Singh Chouhan

Reputation: 14282

Replace the below code in script tag.

$(function() {
    $('#ms8container').hover(function() {
        $('#videoButtonContainer').fadeIn('slow');
      },
      function(){
        $('#videoButtonContainer').fadeOut('slow');
      }
   );
});

Upvotes: 1

Related Questions