diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index 4cf690cf0fc574ee73e24facef49754ebc5d8ad5..93286423cc7e64135551d91c17a750f912adbecd 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -35,9 +35,13 @@ } function processComment(post_id, html){ - $('#'+ post_id + ' .comment_set li:last' ).before( + post = $('#' + post_id)[0] + $(' .comment_set li:last', post ).before( $(html).fadeIn("fast", function(){}) ); + toggler = $('.show_post_comments', post) + toggler.html( + toggler.html().replace(/\d/,$('.comment_set', post)[0].childElementCount -1)); } function processPost(className, html){