Skip to content
Browse files

adding counts to everyone

  • Loading branch information...
1 parent 9840a9b commit 7fdbdb64d3e205e73ba480455b5573d7bb5b7c92 @peterbe committed Oct 8, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 templates/everyone.html
View
11 templates/everyone.html
@@ -24,16 +24,16 @@
{% block content %}
-<h2>{{ page_title }}</h2>
+<h2>{{ page_title }} <span class="total"></span></h2>
<div id="split">
<div id="followsyounot">
- <h3 class="followsyounot">Too cool for me</h3>
+ <h3 class="followsyounot">Too cool for me <span class="total"></span></h3>
<ul>
</ul>
</div>
<div id="followsyou">
- <h3 class="followsyou">Follows me!</h3>
+ <h3 class="followsyou">Follows me! <span class="total"></span></h3>
<ul>
</ul>
</div>
@@ -73,6 +73,11 @@ <h3 class="followsyou">Follows me!</h3>
c = $('#followsyounot ul');
$('#user__' + x).detach().appendTo(c);
});
+ var t0 = $('#followsyounot li').size(),
+ t1 = $('#followsyou li').size();
+ $('#followsyounot .total').text('(' + t0 + ')');
+ $('#followsyou .total').text('(' + t1 + ')');
+ $('h2 .total').text('(' + t1 + '+' + t0 + '=' + (t1 + t0) + ')');
});
}

0 comments on commit 7fdbdb6

Please sign in to comment.
Something went wrong with that request. Please try again.