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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:44:57+00:00 2026-05-19T15:44:57+00:00

I am using the following code to show social icons on hover: You can

  • 0

I am using the following code to show social icons on hover: You can see the site here: http://vitaminjdesign.com/adrian/

$('a').live('mouseover mouseout', function(event) {
          if (event.type == 'mouseover') {

            $('<a href="http://www.facebook.com/sharer.php?u=(this)" target="blank"><img src="images/facebook.gif" class="facebook" alt="facebook"></a>').appendTo(this).fadeIn(500);
            $('<a href="#"><img src="images/twitter.gif" class="twitter" alt="twitter"></a>').appendTo(this).fadeIn(500);
          } else {
            $('a').find('.facebook,.twitter').stop(true, true).fadeOut(500);
          }
        });

The problem I am having is within the facebook URL where you see (this). I want to dynamically add in the URL of the link associated with the current a being hovered. Basically, I want to add in the URL of the element being hovered on into the (this) area of the URL. Anyone?

  • 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-19T15:44:57+00:00Added an answer on May 19, 2026 at 3:44 pm

    A little nicer way (in my opinion) to create elements is to use the properties object argument.

    Also, I assume you only want to load the new elements once, then just fade them thereafter.

    $('.rssRow').live('mouseenter mouseleave', function(event) {
          var twitFace = $(this).find('.facebook,.twitter');
          if (event.type == 'mouseover') {
                if( twitFace.length ) {
                    twitFace.fadeIn(500);
                } else { 
                    loadTwitFace.call(this);
                }
          } else {
                twitFace.stop(true, true).fadeOut(500);
          }
     });
    
    function loadTwitFace() {
    
        $('<a>', { href:'http://www.facebook.com/sharer.php?u="' + $(this).find('a').attr('href') + '"',
                 target:"blank"})
            .append($('<img>',{       src:'images/facebook.gif',
                                className:'facebook',
                                      alt:'facebook'}))
            .appendTo(this)
            .fadeIn(500);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code to show a jQuery UI dialog when the
I am using the following code to show percentage using String.Format but I also
I'm using the following jquery code to show a contextual delete button only for
I am using the following code to show a follow me box to the
I'm using the following code to show a box when you mouseover a certain
I am using the following code to show and hide two div positioned absolutely
Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something
I'm using the following code to query a database from my jsp, but I'd
I've been using the following code to open Office Documents, PDF, etc. on my
I am using following PHP code to connect to MS Access database: $odb_conn =

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.