Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Commit

Permalink
adding counts to everyone
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed Oct 8, 2011
1 parent 9840a9b commit 7fdbdb6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions templates/everyone.html
Expand Up @@ -24,16 +24,16 @@


{% block content %} {% block content %}


<h2>{{ page_title }}</h2> <h2>{{ page_title }} <span class="total"></span></h2>


<div id="split"> <div id="split">
<div id="followsyounot"> <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>
</ul> </ul>
</div> </div>
<div id="followsyou"> <div id="followsyou">
<h3 class="followsyou">Follows me!</h3> <h3 class="followsyou">Follows me! <span class="total"></span></h3>
<ul> <ul>
</ul> </ul>
</div> </div>
Expand Down Expand Up @@ -73,6 +73,11 @@ <h3 class="followsyou">Follows me!</h3>
c = $('#followsyounot ul'); c = $('#followsyounot ul');
$('#user__' + x).detach().appendTo(c); $('#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) + ')');
}); });
} }


Expand Down

0 comments on commit 7fdbdb6

Please sign in to comment.