title: Setting Jquery UI slider's initial value from an input
body: <p>I'm trying to generalize some slider code so that it will work with a few input + slider combinations.</p>
  
  <p>I have everything essentially working - slide the slider, the input value updates or enter a number in the input, the slider moves to the proper location. </p>
  
  <p>However, I'm having trouble initializing the sliders from the default values of the inputs. Here's what my code looks like:</p>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>$(".slider").slider({
          min: 0,
          max: 5,
          value: $(this).parent().find(".inputNumber").val(),
          step: 0.25,
          slide: function (event, ui) {
              $(this).parent().find(".inputNumber").val(ui.value);
          }
      });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>    &lt;div class="inputWrap hidden"&gt;
      &lt;input class="mini inputNumber" type="text" value="0.5"&gt;
      &lt;div class="slider"&gt;&lt;/div&gt;
      &lt;/div&gt;
  </code></pre>