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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:06:39+00:00 2026-05-13T13:06:39+00:00

I have the following scenario… When I hover over span.share-this , it triggers a

  • 0

I have the following scenario…

When I hover over span.share-this, it triggers a div called ‘under‘ to come into view. This bit works exactly the way I want. Now I set it so, that when the mouse cursor is on the ‘under’ div and I mouseout, the ‘under’ div goes away and everything is back the way it was (Everything is still dandy).

My problem is that when I hover over the span.share-this and do not navigate to the ‘under’ div, but navigate away to another part of the page, the ‘under’ div is still visible.

I would like to set it so, that if I navigate from span.share-this to another part of the page, the ‘under’ div hides.

Does anybody know what function I should look at?

JQuery Code

$('#slider span.share-this').mouseover(function()
{   
    $(this).parents('li').children('div.under').css('bottom', '12px');
});

$('#slider div.under').mouseout(function()
{
    $(this).css('bottom', '52px');
});

HTML Code

<li>
    <div class="item">
        <span class="share-this">Share This</span>
    </div>
    <div class="under">
        Under
    </div>
</li>

Testing url: http://www.eirestudio.net/share/

  • 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-13T13:06:40+00:00Added an answer on May 13, 2026 at 1:06 pm

    You’ve got a good start. You just need to add a few more mouseover’s and mouseout’s. Using hover will probably be the easiest.

    $('#slider span.share-this').hover(function()
    {   
        $(this).parents('li').children('div.under').css('bottom', '12px');
    }, function(){
        $(this).parents('li').children('div.under').css('bottom', '52px');
    });
    
    $('#slider div.under').hover(function()
    {
        $(this).css('bottom', '12px');
    },function()
    {
        $(this).css('bottom', '52px');
    });
    

    Depending on your needs and how far away, spacially, on the page, the two elements are, you may also want to look into setTimeout and clearTimeout Javascript functions. If the span and the div are far enough away where someone could drag off of the span.share-this and not be mousing over the div.under, you would set a timeout which, after a certain number of milliseconds, would hide the div.under. And then if they are over the div.under you’d clear the timeout. Just quickly, it may resemble something like this:

    function hideUnder(){
       $('#slider div.under').css('bottom', '52px');
    }
    
    var under;
    $('#slider span.share-this').hover(function()
    {   
        clearTimeout(under);
        $(this).parents('li').children('div.under').css('bottom', '12px');
    }, function(){
        under = setTimeout(hideUnder, .5*1000);
    });
    
    $('#slider div.under').hover(function()
    {
        clearTimeout(under);
        $(this).css('bottom', '12px');
    },function()
    {
        under = setTimeout(hideUnder, .5*1000);
    });
    

    Of course, though, this would cause a half-second delay before the div.under was hidden.

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

Sidebar

Related Questions

I have following scenario: I have a XML-Document, e.g. like this <someRootElement> <tag1> <tag2
I have the following scenario. I have a search page which is split into
I have the following scenario to implement: there is the product registration, but this
I have the following scenario I have a main form as MDI parent and
Due to company constraints out of my control, I have the following scenario: A
I want to accomplish the following scenario in Drupal: You have 2 content-types. Lets
How could I best implement the following scenario? I have a Next Period... button
Hi I need some help with the following scenario in php. I have a
i have following scenario and can't seem to find anything on the net, or
I have following scenario: alt text http://static.zooomr.com/images/7579022_e64808b855_o.png We have a WebService which poses as

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.