title: Replace multiple dots and comma javascript
body: <p>I'm using <code>number_format($number,2,",",".")</code>. An example number is in this format: <code>8.726,36</code></p>
  
  <p>I did sum of rows with javascript: </p>
  
  <pre><code>var totals = [0,0,0,0,0,0];
  
  $(document).ready(function(){
      var $dataRows = $("#sum_table tr:not('.totalColumn, .titlerow')");
      $dataRows.each(function() {
          $(this).find('.rowDataSd').each(function(i) {        
              totals[i] += parseFloat( $(this).html());
          });
      });
  
      $("#sum_table td.totalCol").each(function(i) {  
          $(this).html(totals[i].toFixed(2).replace(".",",")+ " kn");
      });
  });
  </code></pre>
  
  <p>But total is not good (blue row).</p>
  
  <p><a href="https://i.stack.imgur.com/Dd77K.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dd77K.jpg" alt="Photo"></a></p>
  
  <p>How can I use multiple <code>.replace(",",".")</code>?</p>