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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:49:45+00:00 2026-05-24T17:49:45+00:00

Need some help on a script I am doing… what I want to accomplish

  • 0

Need some help on a script I am doing… what I want to accomplish is when you hover over any a class of ‘test’ the #socializethis div will show. When you mouseout it will disappear. I have accomplished that, however, I need it to stay focused while actually over #socializethis as well so the box does not disappear.

Second thing I wish to do and have no idea how to go about is determine the position of the a class ‘test’ so I can show the box right beside it, under it, etc.

Im going to try and use this for a social sharing script.

index.html

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="share.js"></script>
<link rel="stylesheet" href="share.css" type="text/css" />

</head>

<body>
<div id="social">
<a class="test" href="#">share this</a>
</div>
</body>

</html>

share.css

img {border: none;}
#socializethis{
 height:37px;
 width:260px;
 position:absolute;
 bottom:500px;
 right:900px;
 overflow:hidden;
 display:none;
 visibility:hidden;
 padding:3px 3px 3px 3px;
 /* CSS3 */
 -webkit-border-radius: 10px;
 -moz-border-radius: 10px;
 border-radius: 10px;
 -moz-box-shadow: 0 0 3px 3px #555;
 -webkit-box-shadow: 0 0 3px 3px #555;
 box-shadow: 0 0 3px 3px #555;
}

#socializethis a{
 float:left; 
 width:32px;
 margin:3px 3px 3px 3px; 
 padding:0; 
}

#socializethis span{ 
 float:left; 
 margin:3px 3px 3px 3px;
 text-shadow: 1px 1px 1px #FFF;
 color:#444;
 font-size:12px;
}

share.js

(function( $ ) {
  $(document).ready(function() { 

  var twit = 'http://twitter.com/home?status='+title+'%20'+url;
  var facebook = 'http://www.facebook.com/sharer.php?u='+url
  var digg = 'http://digg.com/submit?phase=2&url='+url+'&amp;title='+title;
  var stumbleupon = 'http://stumbleupon.com/submit?url='+url+'&amp;title='+title;
  var buzz = 'http://www.google.com/reader/link?url='+url+'&amp;title='+title+'&amp;srcURL='+host;
  var delicious  = 'http://del.icio.us/post?url='+url+'&amp;title='+title;

  var tbar = '<div id="socializethis"><span>Share<br /><a href="#min" id="minimize" title="Minimize"><img src="images/minimize.png" /> </a></span><div id="sicons">';
  tbar += '<a href="'+twit+'" id="twit" title="Share on twitter"><img src="images/twitter.png"  alt="Share on Twitter" width="32" height="32" /></a>';
  tbar += '<a href="'+facebook+'" id="facebook" title="Share on Facebook"><img src="images/facebook.png"  alt="Share on facebook" width="32" height="32" /></a>';
  tbar += '<a href="'+digg+'" id="digg" title="Share on Digg"><img src="images/digg.png"  alt="Share on Digg" width="32" height="32" /></a>';
  tbar += '<a href="'+stumbleupon+'" id="stumbleupon" title="Share on Stumbleupon"><img src="images/stumbleupon.png"  alt="Share on Stumbleupon" width="32" height="32" /></a>';
  tbar += '<a href="'+delicious+'" id="delicious" title="Share on Del.icio.us"><img src="images/delicious.png"  alt="Share on Delicious" width="32" height="32" /></a>';
  tbar += '<a href="'+buzz+'" id="buzz" title="Share on Buzz"><img src="images/google-buzz.png"  alt="Share on Buzz" width="32" height="32" /></a>';
  tbar += '</div></div>';

  // Add the share tool bar.
  $('#social').append(tbar);
  $('#socializethis').css({opacity: 1}); 

  // hover
  $('a.test').bind('mouseover',function(){
  $('#socializethis').animate({opacity: 1}, 600);
  $('#socializethis').css({display:'inline', visibility: 'visible'});   
  });

  $('#socializethis').bind('mouseover',function(){
  $('#socializethis').animate({opacity: 1}, 600);
  $('#socializethis').css({display:'inline', visibility: 'visible'});   
  });

  //leave
  $('a.test').bind('mouseout',function(){
    $('#socializethis').animate({opacity: 0}, 600, function(){
        $('#socializethis').css({display:'none', visibility: 'hidden'});   
    });
  }, 600);

  });
})(jQuery);
  • 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-24T17:49:46+00:00Added an answer on May 24, 2026 at 5:49 pm

    To answer your first question – use jQuery’s mouseenter and mouseleave instead of mouseover and mouseout. Mouseenter will allow children to trigger their parent’s mouseenter event. The jQuery page http://api.jquery.com/mouseenter/ has a good demo at the bottom showing the difference. Then put both test and socialize elements in a parent div, which while socialize is hidden, will look only like test. This way mouseleave will not be called unless the user leaves both elements.

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

Sidebar

Related Questions

Need some help about with Memcache. I have created a class and want to
I need some help with jQuery script again :-) Just trying to play with
I need some help from the shell-script gurus out there. I have a .txt
I need some help with creating a regex for my php script. Basically, I
I need to write some ruby script which will help me with big image
I need your help in doing the ajax part to refresh the div on
I'm doing a translation of php script and want to gain some time by
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help with this problem in implementing with XSLT, I had already implemented

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.