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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:46:35+00:00 2026-05-20T04:46:35+00:00

http://jsfiddle.net/nicktheandroid/3AraQ/ When a P is hovered over, #both is appended to that paragraph and

  • 0

http://jsfiddle.net/nicktheandroid/3AraQ/

When a P is hovered over, #both is appended to that paragraph and centered. When i hover off and then onto a new paragraph, it fades out on the first P and fades in on the now hovered P. is this the best way to do it? Later on i’ll use this to allow people to click a bookmark image, then when they hover a P it will do what my code below does, then when they click on that P it will create a bookmark to that paragraph, but I really just need help with the code below. THANKS!

$('p').hover(function() {

    $(this).append('<span id="both">BOOKMARK THIS</span>')
        $('#both').animate({opacity: 1.0}) 

}, function(){
        $('#both').fadeOut(600, function(){
            $(this).remove()
        })
});

it’s not working smoothly, it’s just not right….

  • 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-20T04:46:36+00:00Added an answer on May 20, 2026 at 4:46 am

    Just use class instead of id:

    $('p').hover(function() {
    
        $(this).append('<span class="both">BOOKMARK THIS</span>')
            $('.both').animate({opacity: 1.0}) 
    
    }, function(){
            $('.both').fadeOut(600, function(){
                $(this).remove()
            })
    });
    

    http://jsfiddle.net/yzXxH/

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

Sidebar

Related Questions

http://jsfiddle.net/nicktheandroid/3LxRr/ When highlighting a paragraph containing a link that's set to display:inline-block, there appears
http://jsfiddle.net/RedKnight91/Z6Ueu/4/ Hi! Look at that last menu (on the bottom). When you hover on
http://jsfiddle.net/nicktheandroid/SsfpG/ I don't understand why these inline elements are causing the paragraph to stop
http://jsfiddle.net/nicktheandroid/B7Rhe/5/ I'm trying to make the next slide fade in over the current slide,
http://jsfiddle.net/nicktheandroid/GPFxM/28/ I've also explained the situation in the JS Fiddle example. I binded hover
http://jsfiddle.net/caMvN/1/ when you hover over the green area, it is supposed to show two
http://jsfiddle.net/zjRga/55/ I want a div to open up that will appear over top of
http://jsfiddle.net/nicktheandroid/F8v2c/3/ I'm trying to make a radial gradient that flows seamlessly between 2 sibling
http://jsfiddle.net/studioband/pG87G/6/ This link is apart of a website that I am designing. I have
http://jsfiddle.net/fJkBU/1/ That's my code. Basically, I have an iFrame whose source may change. I

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.