title: jQuery price slider filter values
body: <p>I have created a jQuery price slider but I am not sure how to have the filter area start with actual price ranges? Currently it has '<strong>$[object Object] - $[object Object]</strong>' when I'd prefer it to have something like '<strong>$299 - $1099</strong>'. 
  Once you start moving the slider selectors the object references are replaced by the correct prices, but I want the filter area to have the correct ranges from the start.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="slider-container"&gt;&lt;/div&gt;
  &lt;p&gt;
  &lt;label for="amount"&gt;Price range:&lt;/label&gt;
  &lt;input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" /&gt;
  &lt;/p&gt;
  &lt;div id="computers"&gt;
  &lt;div class="system" data-price="299"&gt;div1 -  299&lt;/div&gt;
  &lt;div class="system" data-price="599"&gt;div2 -  599&lt;/div&gt;
  &lt;div class="system" data-price="1099"&gt;div3 -  1099&lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="slider-range"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>  $(function() {
      $('#slider-container').slider({
          range: true,
          min: 299,
          max: 1099,
          values: [299, 1099],
          slide: function(event, ui) {
              $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
              var mi = ui.values[ 0 ];
              var mx = ui.values[ 1 ];
              filterSystem(mi, mx);
          }
      });
    $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
    " - $" + $( "#slider-range" ).slider( "values", 1 ) );
  });
  
  function filterSystem(minPrice, maxPrice) {
  $("#computers div.system").hide().filter(function() {
      var price = parseInt($(this).data("price"), 10);
      return price &gt;= minPrice &amp;&amp; price &lt;= maxPrice;
  }).show();
  }
  </code></pre>
  
  <p>I based my structure from the following code:
  <a href="http://jsfiddle.net/bZmJ8/32/" rel="nofollow noreferrer">http://jsfiddle.net/bZmJ8/32/</a></p>
  
  <p>Any help is greatly appreciated.</p>