Comment sets now pop open on receiving a new comment
This commit is contained in:
parent
50459d896c
commit
e714e0d457
2 changed files with 6 additions and 2 deletions
|
|
@ -48,6 +48,10 @@
|
|||
toggler = $('.show_post_comments', post)
|
||||
toggler.html(
|
||||
toggler.html().replace(/\d/,$('.comment_set', post)[0].childElementCount -1));
|
||||
|
||||
if( !$(".comments", post).is(':visible') ){
|
||||
toggler.click();
|
||||
}
|
||||
}
|
||||
|
||||
function processPost(className, html, groupIds){
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
$(document).ready(function(){
|
||||
|
||||
$('.comment_set').each(function(index) {
|
||||
var $this = $(this);
|
||||
if($this.children().length > 1) {
|
||||
$this.parent().show();
|
||||
var show_comments_toggle = $this.parent().prev().children(".show_post_comments");
|
||||
show_comments_toggle.html("hide comments ("+ ($this.children().length - 1) + ")");
|
||||
show_comments_toggle.click();
|
||||
};
|
||||
});
|
||||
});//end document ready
|
||||
|
|
|
|||
Loading…
Reference in a new issue