title: Add thousand separators to output from jQuery Slider plugin
body: <p>I'm using the jQuery Slider plugin (jqueryui.com/demos/slider/)</p>
  
  <p>I'm calling the plugin with the following Javascript:</p>
  
  <pre><code>$(function(){
   $("#slider-price").slider({
   range: true,
   min: 0,
   max: 5000000,
   step: 100000,
   values: [0, 5000000],
   slide: function(event, ui) {       
   $("#amount").val('£' + ui.values[0] + ' - £' + ui.values[1]);
  }
  });
  });
  </code></pre>
  
  <p>And printing onto the page with the mark-up:</p>
  
  <pre><code>&lt;label for="amount"&gt;Price : &lt;/label&gt;
  &lt;input class="bar-price" type="text" id="amount" /&gt;
  &lt;div id="slider-price"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Of course the Javascript above will print something like "£0 - £5000000" into the "amount" input box.</p>
  
  <p>I've been looking at a way to extend the Javascript so that it formats the numbers with thousand separators (i.e. "£0 - £5,000,000"). I have found several Javascript functions that will do this, but I can't seem to call them within the jQuery function block.</p>
  
  <p>For example this function would be perfect <a href="http://www.mredkj.com/javascript/nfbasic.html" rel="nofollow noreferrer">http://www.mredkj.com/javascript/nfbasic.html</a> but I cant seem to reference it before printing the numbers into the input box string.</p>
  
  <p>I'm sure there must be a simple solution to this.</p>