title: Jquery UI Range Slider with associated Text Input Events (Failing)
body: <p>I have a range slider on my site for min-max price ranges.  On either side of the slider are two text input boxes.  I've created a callback function with the slider which adjusts the vals of the text boxes based on a val change within the slider. </p>
  
  <p>At the same time, I would also like to adjust the values of the slider based on changes to th vals of the text boxes.  Right now, the change (also tried keyup) event that I'm binding on the text inputs are not changing the values (position) of the two range slider hands.  What's wrong here?</p>
  
  <pre><code>$('.price_slider').slider({orientation:"horizontal",range:true, animate:200,min:0,max:10000, step:100,value:0,values:[{{min_rent}},{{max_rent}}], slide:function(event,ui){
      $('input#lower_bound').val(ui.values[0]);
      $('input#upper_bound').val(ui.values[1]);
      }
      });
  
  
  $('input#lower_bound').change(function(){
      $('.price_slider').slider("values",[$(this).val(),$('input#upper_bound').val()]);
  });
  
  
  $('input#upper_bound').change(function(){
      $('.price_slider').slider("values",[$('input#lower_bound').val(),$(this).val()]);
  });
  </code></pre>
  
  <p>EDIT--</p>
  
  <p>Matt, I saw your revision.  Just curious if your version is more efficient than mine.  Mine does seem to be working but I'm clearly not an expert:</p>
  
  <pre><code>    $lower.add($upper).change(function () {
      var lowEnd=parseInt($lower.val());
      var highEnd=parseInt($upper.val());
  
      if(highEnd&gt;lowEnd){
          $slider.slider('values', 0, parseInt($lower.val(), 10));
          $slider.slider('values', 1, parseInt($upper.val(), 10));
      }
      else{
          $slider.slider('values', 0, parseInt($lower.val(), 10));
          $slider.slider('values', 1, parseInt($lower.val(), 10));
          $upper.val([$lower.val()]);
      }   
  });
  </code></pre>