Quick question. I've got html code like that:
<li class='entry'>
<div class='entryContent'>
<p class='entryText'>Entry text></p>
<a href="#" class='entryReply'>Reply</a>
</div>
</li>
When I click on Reply a div with reply form is being appended to 'entry'. So it looks like:
<li class='entry'>
<div class='entryContent'>
<p class='entryText'>Entry text></p>
<a href="#" class='entryReply'>Reply</a>
</div>
<div class='replyForm'>
//form stuff
</div>
</li>
Now what I want to do is to create user-script which will find that dynamic div.replyForm
and append some stuff into it:
<li class='entry'>
<div class='entryContent'>
<p class='entryText'>Entry text></p>
<a href="#" class='entryReply'>Reply</a>
</div>
<div class='replyForm'>
//form stuff
//MyAppendedStuff
</div>
</li>
I've already tried
$("body").on("focus", ".replyForm", function(){
$(this).append('<span>Hello World!</span>');
});
but it didn't work.
Any ideas?