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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:05:34+00:00 2026-06-05T00:05:34+00:00

First time post; long time reader. I’ve come across this problem and I now

  • 0

First time post; long time reader. I’ve come across this problem and I now know the cause with no end result/fix that I could find. Apologies in advance if this has been answered previously.

I have some data in a php that gets appended via the ajax command within jQuery (JSON). This displays correctly, taking on the particular CSS assigned and such.

I have a time displayed which shows ’10 minutes ago’ or however long it was posted, but I am trying to get it to display the actual date/time on hover. This is the end product but to get to this point I’m just trying to assign a CSS for visual testing to make sure it does work.

The mouseover command can happen at any point so I can’t do it once the JSON data is appended.

$("span.post-name").mouseover(function () {
    $(this).css("color","red");
});

This function does work on the same span put directly into the HTML, but not on data that is built. Any help would be much appreciated..

  • 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-05T00:05:36+00:00Added an answer on June 5, 2026 at 12:05 am

    Is the problem with adding a function to content that has been dynamically added? If so, then you would want to use .on() and have it look like so:

    
    $("body").on("mouseenter", "span.post-name" function(event) {
       ("span.post-name").css("color", "red");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, long time visitor, first time post. Instead of PowerShell telling me the result
First post, but long time browser :) So here's my problem: Basically I have
Hey! First post for me but long time reader of Stackoverflow. Anyway, got a
This is my first post after being a long-time lurker - so please be
This is my first time to post my query on stackoverflow. I have created
This is my first time here so I hope I post this question at
this is my first post on this website, but I'm all the time getting
Long time reader, first time poster. Working on a web site at http://www.howardpitch.com/ ,
Howdy -- Long time reader, first time questioner. :) I could really use some
I've been struggling a long time with this problem and I can't get it

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.