title: Jquery UI Slider change value of slider when changed in input field
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#storlekslider").slider({
    range: "max",
    min: 0,
    max: 1500,
    value: 0,
    slide: function(event, ui) {
      $("#storlek_testet").val(ui.value);
      $(ui.value).val($('#storlek_testet').val());
    }
  });
  // $( "#storlek_testet" ).val( $( "#storlekslider" ).slider( "value" ) );
  
  $("#storlek_testet").change(function() {
    $("#storlekslider").slider("value", $(this).val());
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/ui/1.9.0/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"&gt;
  &lt;div id="storlekslider"&gt;&lt;/div&gt;
  &lt;input type="text" name="storlek" id="storlek_testet" value="500" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Heres a <a href="http://jsfiddle.net/p4gqJ/" rel="nofollow noreferrer">js fiddle</a> </p>
  
  <p>im trying to get the slider to jump to the correct position when I change the value in the input field.
  Iam using the <a href="http://jqueryui.com/slider/" rel="nofollow noreferrer">Jquery UI slider</a>.</p>