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 269877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:54:30+00:00 2026-05-11T23:54:30+00:00

I am trying to replicate the text overlay effect that occurs when you mouse

  • 0

I am trying to replicate the text overlay effect that occurs when you mouse over an image – found on the Guardian web site.

I have it working except when my mouse goes over the trail-text area that area bounces (slideDown slideUp) repeatedly a number of times.

I think it is because the trail-text area becomes the focus and causes the mouseout event.

Anyway any suggestions/tips would be really helpful.
Many thanks,
Ben…

mypage.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang='en-en' xml:lang='en-en' xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title>TEST</title>
    <style type="text/css">
      .pixie {
        width: 870px;
        padding: 0;
        margin: 0;
      }

      .strap {
        padding: 0;
        margin: 0;
      }

      div.caption{
        padding-left: 10px;
        /*background-color: #a5a5a5;*/
        background-color: #e03d32;
        color: white;
      }
      .caption h3 {
        color: white;
      }

      .pixie a,
      .pixie div,
      .pixie a:hover {
        display: block;
        position: relative;
        text-decoration: none;
      }

      .pixie div.trail-text {
        color: #333;
        background-color: transparent;
        background-image: url(../images/grey-bg.png);
        background-repeat: repeat;
      }

      .pixie div.trail-text {
        display: none;
        margin-top: 0;
        position: absolute;
        overflow: hidden;
        text-align: left;
        padding-top: 2em;
        padding-bottom: 0;
        z-index: 10;
        height: 4.25em;
        width: 870px;
      }
    </style>
    <script src='javascripts/jquery-1.3.2.min.js' type='text/javascript'></script>
    <script src='javascripts/main.js' type='text/javascript'></script>
  </head>

  <body>
    <div class='pixie'>
      <div class='caption'>
        <h3>Some Big Heading</h3>
        <p class='strap'>Some strapline of stuff</p>
      </div>
      <div class='trail-text'>
        The <strong>Overlay text</strong> which should appear and then disappear.
      </div>

      <img alt='overlay example image' class='imgmain' src='/images/east-hamstead.jpg' title='' />
    </div>
  </body>
</html>

main.js

$(document).ready(function(){

  $("div.trail-text").attr("style", "display: none;");

  if ($(".pixie,div.trail-text")) {
    var pixies = $(".pixie,div.trail-text");
    $(pixies).mouseover(function() {
      $(this).find("div.trail-text").slideDown("fast")
    }).mouseout(function() {
      $(this).find("div.trail-text").slideUp("fast")
    });
  };
});
  • 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-11T23:54:31+00:00Added an answer on May 11, 2026 at 11:54 pm

    The problem is that the mouseover and mouseout events bubble upward, which means they fire every time the mouse enters or leaves any element within your div.

    You should use jQuery’s hover method, like this:

    $(".pixie,div.trail-text").hover(
        function() { $(this).find("div.trail-text").slideDown("fast"); },
        function() { $(this).find("div.trail-text").slideUp("fast"); }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 198k
  • Answers 198k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's not a case of "by reference" or "by value"… May 12, 2026 at 7:39 pm
  • Editorial Team
    Editorial Team added an answer This is possible in GCC 4.0 and later. The GCC… May 12, 2026 at 7:39 pm
  • Editorial Team
    Editorial Team added an answer Scott Meyers has advocated that non-member functions often improve encapsulation:… May 12, 2026 at 7:39 pm

Related Questions

I am currently playing around with the FCKEditor, and I am trying to replicate
I have an image data type in my table. When I query using SQL
I am trying to place an action to happen after an entire .aspx page
Using the CRM views, is there a way to retrieve a list of all

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.