replace in comment websocket action replaces one or more number instead of just the first

This commit is contained in:
Daniel Vincent Grippi 2010-09-12 22:33:51 -07:00
parent c133233155
commit 897074c869

View file

@ -46,8 +46,9 @@
$(html).fadeIn("fast", function(){})
);
toggler = $('.show_post_comments', post)
toggler.html(
toggler.html().replace(/\d/,$('.comment_set', post)[0].childElementCount -1));
toggler.html().replace(/\d+/,$('.comment_set', post)[0].childElementCount -1));
if( !$(".comments", post).is(':visible') ){
toggler.click();