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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:10:03+00:00 2026-06-16T00:10:03+00:00

Not understanding why my link won’t show up when I hover over an image.

  • 0

Not understanding why my link won’t show up when I hover over an image. I’m sure it is something very simple that I am unable to see at this time. I would be very appreciative if someone pointed out what I’m missing as well as any other tips one may have.

$("#profile_pic").hover(
        function () {
            $(this).show($('<a id="duh" href="upload.php">Change the picture</a>'));
        }
);

The link I’m trying to get to show on hover is below

<div>
    <img id= "profile_pic" src="<?php echo $picture;?>" width="164" height="164" />
</div>
  • 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-16T00:10:04+00:00Added an answer on June 16, 2026 at 12:10 am

    Probably the issue is that <img> elements can’t have content, yet you’re trying to append that markup to it.

    What you could do is append that to the parent.

    $("#profile_pic").hover(
            function () {
                $(this).closest('div').append($('<a id="duh" href="upload.php">Change the picture</a>'));
            });
    

    Now, however you do this, note that the .hover() API will result in your function being called each time that the mouse moves in or out of the element. Each call will append another block of HTML. Do you really want to do that?

    I suggest that, instead, you always have that <a> tag on the page, and that you make your .hover() handler show/hide it.

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

Sidebar

Related Questions

Im not understanding something about rest web services. When you do get, post etc
Either I am missing something or not understanding other posts/instructions. I am trying to
I've read this answer about eight-five times, but there's something I'm not understanding correctly:
We're using ReportBuilder 1.0 (2005) for now. I'm not understanding the way that the
It's my understanding that py2exe can only dynamically link a python2x.dll file. Are there
Perhaps I'm not understanding completely, but I'm trying to get the {@link} inline PHPDoc
From my understanding, it appears that INotifyPropertyChanged is very useful when working with UI
I think this has to be a very simple question but I am not
Not understanding why my commit to remote git repo is not working. So I
I'm not understanding how OAuth2 works for Google API. Supposing I've signed in API's

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.