title: Data attribute, separate by commas
body: <p>I am developing a website using html, css, jQuery.</p>
  
  <p>I am trying to show some stats that will be kind of numbers say: 376766 user registered </p>
  
  <p>But I am doing it by <code>data-</code> attribute:</p>
  
  <pre><code>&lt;strong class="datafill1" data-to=""&gt;0&lt;/strong&gt;
  </code></pre>
  
  <p>Here I pass <code>data-to</code> by a random script generator.</p>
  
  <p>Problem is that I want to separate numbers by comma but I am not able to do </p>
  
  <p>Please help me </p>
  
  <ul>
  <li>Current Format :376766</li>
  <li>Desired Format : 3,76,766</li>
  </ul>
  
  <p>I am trying it but not able to do it :(</p>
  
  <p>Update :
  Here is the script:
  //-------------------------fake counter 1</p>
  
  <pre><code>function fakecounter1(){
  
  //decrease/increase counter value (depending on perceived popularity of your site!)
  var decrease_increase=11439
  
  var counterdate=new Date()
  var currenthits=counterdate.getTime().toString()
  currenthits=parseInt(currenthits.substring(2,currenthits.length-4))+decrease_increase
  
  var df1=currenthits -2746740;
  $('.datafill1').attr('data-to', df1);
  }
  fakecounter1()
  </code></pre>