451 | | var parent_li = comment_li.parents('ul#activity-stream > li'); |
452 | | jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html() - ( 1 + child_count ) ); |
| 451 | var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span'); |
| 452 | var new_count = count_span.html() - ( 1 + child_count ); |
| 453 | count_span.html(new_count); |
| 454 | |
| 455 | /* If that was the last comment for the item, remove the has-comments class to clean up the styling */ |
| 456 | if ( 0 == new_count ) { |
| 457 | jq(comment_li.parents('ul#activity-stream > li')).removeClass('has-comments'); |
| 458 | } |