Add thousand comma separators to input type number
<p>I have this script that was maked by another memeber of stackoverflow but I need to put a comma separator for thousands numbers.</p>

<p>How I can do that?</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>(function($) {
  $.fn.currencyInput = function() {
    this.each(function() {
      var wrapper = $("&lt;div class='currency-input' /&gt;");
      $(this).wrap(wrapper);
      $(this).before("&lt;span class='currency-symbol'&gt;$&lt;/span&gt;");
      $(this).change(function() {
        var min = parseFloat($(this).attr("min"));
        var max = parseFloat($(this).attr("max"));
        var value = this.valueAsNumber;
        if(value &lt; min)
          value = min;
        else if(value &gt; max)
          value = max;
        $(this).val(value.toFixed(2)); 
      });
    });
  };
})(jQuery);

$(document).ready(function() {
  $('input.currency').currencyInput();
});</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>.currency {
  padding-left:12px;
}

.currency-symbol {
  position:absolute;
  padding: 2px 5px;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
&lt;input type="number" class="currency" min="0.01" max="2500.00" value="25.00" /&gt;</code></pre>
</div>
</div>
</p>