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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:57:24+00:00 2026-05-20T08:57:24+00:00

Im creating a feature using jquery on my site that allows people to place

  • 0

Im creating a feature using jquery on my site that allows people to place a bookmark on a paragraph when they’re viewing an article, so if they want to come back later, they’ll know where they stopped.

When the user clicks on “PLACE A BOOKMARK”, it adds the class .placing to that link. When the user hovers over a paragraph, the script checks to see if the link has the .placing class, if it does, it fades in a div on hover that says “bookmark this paragraph”, on hover off it fades that div back out.

Right now my code is placed within a $('P').click(function... that is within the hover function, it’s caused links on the page to not fire their hover animation. So links inside paragraphs wont animate on hover because when i hover over a paragraph it’s checking for the .placing class and doing the bookmark hover function.

How would i get the hover animation to work again on links that exist within paragraphs?
and is this the best way to do it? to check for the .placing class every single time i hover over a paragraph? There’s gotta be a better way to do this, like a switch that only allows the bookmark paragraph hovering function to work when the switch is on, and not checking with every single paragraph hover.

    $('#placeBookmark').click(function () {
            $(this).toggleClass('placing')

    })

    $('p').hoverIntent(function () {
        // HOVER ON
        if ($('#placeBookmark').hasClass('placing')) {
            $(this).append('<span id="bookmarkThis">BOOKMARK THIS</span>')
            $(this).find('#bookmarkThis').stop().animate({opacity: 1.0}, 400) 

  $('p').click(function (e) {
        var newbm = $('#bookmark').offset().top
        var offset = $(this).offset();
        var top = offset.top
        var phrases = ["SUCCESS", "SWEEEEEEET MANNN", "AWESOMELY AWESOME", "NEAT-OH!", "EXCELLENT, BOOKMARK PLACED", "BOOKMARK SAVED", "YOU DID IT KID!", "WOOOHOOO", "YOU ARE WONDERFUL"];

        if ($('#placeBookmark').hasClass('placing')) {
           //$('#placeBookmark').trigger('click')
           $('#placeBookmark').removeClass('placing')

            if (top == newbm) {
               // bookmarkColorDelay = 2000
                $('#bookmarkThis').html('<span>ITS ALREADY BOOKMARKED</span> SILLY PERSON').delay(2000).fadeOut(400, function () {
                    $(this).remove()//html('BOOKMARK THIS')
                })
            } else {
               // bookmarkColorDelay = 1000
                var selectedPhrase = phrases[Math.floor(Math.random() * phrases.length)];
                $('#bookmarkThis').html(selectedPhrase).delay(1000).fadeOut(400, function () {
                    $(this).remove()//html('BOOKMARK THIS')
                })
                $('#bookmark').fadeOut(300, function () {
                    $(this).css({
                        left: offset.left - 30,
                        top: top
                    }).fadeIn(300);
                })
            }
            $(this).stop().delay(bookmarkColorDelay).animate({
                color: "#333",
                backgroundColor: "#fff"
            }, 200)
        }
    });

        } 
    }, function () {
        // HOVER OFF
        if ($('#placeBookmark').hasClass('placing')) {
            $(this).find('#bookmarkThis').stop().fadeOut(400, function(){
                $(this).remove()
            })
        }
    });
  • 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-20T08:57:25+00:00Added an answer on May 20, 2026 at 8:57 am

    Use a class selector! 🙂

    $('.placing').live('click', function(event) {
        // Whatever you want to do
    });
    
    $('.placing').live('hover', function(event) {
        // Whatever you want to do
    });
    

    It will work even though the class .placing is added later.

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

Sidebar

Related Questions

i am creating a new feature on my site that allow people to send
i am creating a related post article feature for my wordpress enabled site.being new
I am creating a Blog using RoR with a sign-in feature and I want
I am creating an application. I have to implement a bookmark feature, and adding
I am creating a service that allows my website visitors to create content (text)
I am considering using LibSVM and I am creating the required feature vectors. In
In iOS5 using storyboard feature I want to create a custom container which will
Say I am using git by creating a new branch for each feature, then
I have been using Eclipse for a long time, the feature that is less
I am creating an upload feature that stores a user uploaded file on the

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.