Mercurial > public > sg101
diff media/js/comments.js @ 200:7d3e5aca095f
Fixing #73: comments no longer getting adding to web page on submit.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 11 Apr 2010 19:41:13 +0000 |
parents | b8474ffe76d9 |
children |
line wrap: on
line diff
--- a/media/js/comments.js Sun Apr 11 18:56:30 2010 +0000 +++ b/media/js/comments.js Sun Apr 11 19:41:13 2010 +0000 @@ -19,10 +19,12 @@ dataType: 'html', success: function (data, textStatus) { postText.val(''); - $('#comment-list').append(data); - var lastLi = $('#comment-list > li:last'); - lastLi.hide(); - lastLi.fadeIn(3000); + $('#comment-container').append(data); + var newDiv = $('#comment-container > div:last'); + newDiv.hide(); + var num = $('.comment-list', newDiv); + num.html($('#comment-container > div').size() + "."); + newDiv.fadeIn(3000); postButton.removeAttr('disabled').val('Post Comment'); var count = $('#comment-count'); if (count.length) {