jQuery - Update css after JSON append -


first time post; long time reader. i've come across problem , know cause no end result/fix find. apologies in advance if has been answered previously.

i have data in php gets appended via ajax command within jquery (json). displays correctly, taking on particular css assigned , such.

i have time displayed shows '10 minutes ago' or long posted, trying display actual date/time on hover. end product point i'm trying assign css visual testing make sure work.

the mouseover command can happen @ point can't once json data appended.

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

this function work on same span put directly html, not on data built. appreciated..

is problem adding function content has been dynamically added? if so, want use .on() , have so:

 $("body").on("mouseenter", "span.post-name" function(event) {    ("span.post-name").css("color", "red"); }); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -