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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:22:12+00:00 2026-06-06T19:22:12+00:00

I have several dozen objects with an image and a share button on a

  • 0

I have several dozen objects with an image and a share button on a page at any given time, such as this:

<li class="entry" id="sjDDulC8wt"> 
    <img src="sjDDulC8wt.jpg" />
    <div class="entry_actions">
    <ul class="entry_actions">
        <li class='share_it'><a onclick='javascript: showShare("sjDDulC8wt");' 
        onblur='javascript: hideShare("sjDDulC8wt")' target='_self' 
        title='Share It' class='share_it'>o</a>
        </li>
    </ul>
    <div class="share_options_container"style="display:none;">
        <ul>
            <li><a href="#" class="facebook">F</a></li>
            <li><a href="#" class="twitter">T</a></li>
            <li><a href="#" class="pinterest">X</a></li>
        </ul>
    </div>
</div>

The showShare() function simply opens the share_options_container div inside that particular element of the page when I click on the anchor tag inside the entry_actions ul. When I click off of it, the hideShare() function is supposed to hide it.

function hideShare(id){
$('#' +id+'.share_options_container').hide();
}

When I click on an anchor tag, the corresponding share container div shows up perfectly. When I click off, nothing happens. I’ve also tried this code, which I found on another similar question:

$("body").click(function(){ $(".share_options_container").fadeOut(200); });

However, when I click on one of the anchors, this function immediately starts fading it back out, so if I changed the fade to hide then the container wouldn’t even pop up at all.

Is there an event I can associate my original hideShare() function with such that it will actually trigger when I click off of the anchor tag? If not, can I modify the second function so that it doesn’t hide the particular container I’m trying to show as soon as it pops up?

  • 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-06T19:22:14+00:00Added an answer on June 6, 2026 at 7:22 pm

    HTML:

    <li class='share_it'><a href="javascript:;" title='Share It' class='share_it'>o</a>
    

    JS:

    $(".share_it a").click(function(){
        $(this).closest(".entry").find(".share_options_container").show();                
        })
    $(".share_options_container").mouseleave(function(){
        $(this).hide();              
        })
    

    ​
    ​
    demo: http://jsfiddle.net/JP2Vx/2/

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

Sidebar

Related Questions

I have several dozen objects exposed through COM interfaces, each of which with many
I have several xml files that are formated this way: <ROOT> <OBJECT> <identity> <id>123</id>
I have a GridView that displays several dozen rows worth of a custom layout,
I have a list of objects (Foo). A Foo object has several attributes. An
I have a list of several dozen product attributes that people are concerned with,
I have a plist. It has several dozen keys, each with NSMutableArray items: ...
Just a basic question: If I have several dozen EditText fields that are part
I have a large-ish codebase which builds several dozen libaries and several executables. The
We have a large solution here, with several dozen projects. The only build configuration
I have a class, called Building, and there are several classes that extend it,

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.