title: Format integer thousands separator throughout the document
body: <p>After months of web-development, I find myself completely helpless trying to find a good solution for a simple problem of formatting all the numbers throughout the DOM as I wish. Specifically, I have a js function <strong>my_int_formatter</strong>(), that I want to apply to all integers after the doc has been loaded. Best descriped by example - I want to do something like</p>
  
  <pre><code>&lt;td&gt;my_int_formatter({{django_variable}})&lt;/td&gt;
  </code></pre>
  
  <p>I know the code above won't work, because I have to include 'script' tag, but first, I don't like the messy code, and second, javascript won't recognize python variable</p>
  
  <p>I tried the following way:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;td class = 'my_integer'&gt;{{django_variable}}&lt;/td&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>$(document).ready(function(){
     // ....
     content = $('.my_integer').html();
     $('.my_integer').html(my_int_formatter(content));
  </code></pre>
  
  <p>...but as expected, I got wrong results because the js code applied the same html() content of the first .my_integer element in the DOM chain to all the others. Any ideas how to do this the short and correct way ? </p>