Hi folks,

I have a page with a photo on it.  I load the comments for this photo
via an ajax request:

var item_id_val = $("#item_id").val();

$.post("/show_comments", item_id: item_id_val }, function(data)
{
    /* Update the comment_section div. */
    $("#comment_section").html(data);
});

That works fine, but the html data that /show_comments returns doesn't
work with jQuery.  For example, users can "thumb up" or "thumb down"
comments, but if the html code is loaded via AJAX the .click events
are not "binded" to that loaded data.

How can I fix this problem?

Any ideas or help would be greatly appreciated.

Thanks,
Konstantin

Reply via email to