title: Using jQuery UI Slider dynamically?
body: <p>I have a jQuery UI slider in which if the user types numbers into the input element the slider moves appropriately.</p>
  
  <pre><code>$("#slider-range-min").slider({
              range: "min",
              value: 1,
              step: 1000,
              min: 0,
              max: 5000000,
              slide: function (event, ui) {
                  $("input").val(ui.value);
              }
          });
          $("input").change(function (event) {
              var value1 = $("input").val();
              $("#slider-range-min").slider("option", "value", value1);
          });
  </code></pre>
  
  <p>But what i need is i want the slider to be in the middle whatever value i enter in the text box for the first time and then if i move the slider rightside means my value in the textbox has to increase and for leftside it has to decrease without setting these minimum and maximum values..</p>
  
  <p>Any suggestion?</p>
  
  <p>EDIT: what i need is when i enter 500 in the textbox my slider has to move to the center automatically..if i move the slider rightside the end must be 1000 and for leftside it must be 0 and if i enter 400 slider must move to center position automatically and the rightside end must be 800 and leftside 0</p>