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

  • Home
  • SEARCH
  • 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 9125431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:48:09+00:00 2026-06-17T06:48:09+00:00

This is probably something ease to fix and I have missed some obvious but

  • 0

This is probably something ease to fix and I have missed some obvious but can’t really find what it is.

When I click on backgroundcover I want the div songtitle fadeIn over backgroundcover, it works just fine but when I click on div songtitle I want songtitle to fadeOut and here is were the problems start.

I have tried a few different ways to come arround this but without success. The problem is, when I click songtitle div it fades out as it should but half a second later it fadeIn again and i can’t come arround this.

$(".backgroundcover").click(function() { 
    $(".songtitle").fadeIn("fast");
});

$(".songtitle").click(function() { 
    $(".songtitle").fadeOut("fast");
});

And if I change it to this it works just fine, BUT only one time, so I can only fadeIn the div once!

$(".backgroundcover").click(function() { 
    $(".songtitle").fadeIn("fast");
});

$(".songtitle").click(function() { 
    $(".songtitle").fadeOut({opacity : 0}, 400);
});

And the HTML:

<div class="backgroundcover">
    <div class="songtitle"><a href="#">Hejsan testar</a>Destiny's child - Unknown</div>
</div>
  • 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-06-17T06:48:10+00:00Added an answer on June 17, 2026 at 6:48 am

    The reason for this behaviour is that the handler for the .songtitle click event allows the event to bubble up to it’s parent, which causes the .backgroundcover handler to be invoked as well (which fades the text back in).

    As you’re using jQuery, you can prevent the event propagation by returning false from the handler:

    $(".songtitle").click(function() { 
        $(".songtitle").fadeOut({opacity : 0}, 400);
        return false;
    });
    

    You can see a working example here.

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

Sidebar

Related Questions

This is probably something really simple but for some reason I just can't seem
I know this is probably something simple but I can't seem to find anything
This is probably something quite easy to resolve, but for some reason, I can't
This is probably something very obvious, but I have a new to Qt and
This is probably something simple, but I can't seem to find the answer. I
This is probably something really stupid that I'm doing wrong, but I can't figure
I'm sure this is probably something really simple but I can't see the woods
This probably something really simple, but I have never used CAShapeLayers before, I imported
This is probably something stupid, but I really can't figure it out myself. I'm
This has probably something to do with my transformations, but right now I can't

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.