Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7408091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:50:58+00:00 2026-05-29T05:50:58+00:00

Im having an issue with some jquery im using. I want to be able

  • 0

Im having an issue with some jquery im using. I want to be able to hover a songs album cover which will then display a play button and allow me to play a song. At the moment though when I hover the album cover all the divs containing the same div name for the play button seem to show on the page. How can I icolate the play button to only show on the albumcover I am actively hovering. Also how can I stop the button from fading in and then fading out straight away?

Im using this jquery code at the moment

<script>

$(document).ready(function()
{    
 $("#cover_overlay").hover(
  function () {
    $(".el-play").fadeIn('slow');
  },
  function () {
    $(".el-play").fadeOut('slow');
  }
);
});

</script>

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:50:59+00:00Added an answer on May 29, 2026 at 5:50 am

    Your first problem in your jsFiddle is that you’re assigning the same ID to multiple elements. This is a no-no, as JavaScript will only select the first element it finds with a given ID. You need to replace all those IDs with classes.

    Second, you’re selecting the el-play button with a class, so EVERY element with that class will be faded in and out at the same time.

    Third, you have a problem in that moving the cursor over the .el-play button counts as moving it off of .cover_overlay, so the button immediately fades out. You need to add a handler for the .el-play element as well to cover this.

    Here’s one approach that works for me: http://jsfiddle.net/mblase75/jY2hL/8/

    $(document).ready(function() {
        window.onPlay = false;
        $(".cover_overlay").hover(function() {
            $(this).prev(".el-play").fadeIn('slow');
        }, function() {
            $this = $(this);
            setTimeout(function(){
                if(!window.onPlay) { 
                    $this.prev(".el-play").fadeOut('slow');
                }}, 100);
        });
    
        $('.el-play').hover(function() {
            window.onPlay = true;
        },function() {
            window.onPlay = false;
        });
    });
    

    If that doesn’t work, please study the jQuery tree traversal methods to figure out exactly how to get from .cover_overlay to .el-play.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having an issue regarding some jQuery I am using to highlight a menu
I'm having an issue with my regex. I want to capture <% some stuff
Ok so I'm having some strange issue with an mvc 3 site using javascript
I'm having an odd issue in FF10 using jQuery 1.7.1. I have a gallery
I am having some issues returning data from on page, using jQuery, PHP and
I am having an issue with the JQuery Validation Plugin . I'm using it
Hi I'm having an issue with using jquery overlays failing to close when my
I'm having a particularly odd issue when developing Chrome extensions using jQuery. I have
We are having ans issue with our store/site. We are using jQuery to fire
I've been having this weird issue with jQuery which came with Wordpress 3.2.1. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.