Insert Comment Reply Form Into Page Using Jquery

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2009-01-19T14:39:31Z Indexed on 2010/03/12 7:57 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

I have been making a threaded comment system as a way to learn php and javascript/jquery properly. Ive done bits and bobs in the past but ive made a new years resolution to learn it properly.

Im having trouble inserting a reply form into the comment tree below the comment being replied to. I know this is probably pretty basic but how do you insert html into a page when someone clicks a link.

This code wasn't working for me:

$(document).ready(function(){
    $(function() {
        $('a#reply').click(function() {

            $(this).append("the html blah");    

        });
    });

});

Anyone see where im going wrong?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about form