title: How to get value from jquery slider on every change?
body: <p>i have a problem with jquery slider value after changing it. 
  I'm just using normal jquery UI (version 1.10.4) and jquery core 1.7.2 </p>
  
  <p>First time after refresh i have a value which i want. But after the change i can't get it. And i need that to have a if statemnet which will change a value of the paragraph. </p>
  
  <p>This is a JQuery code: </p>
  
  <pre><code>$(function() {
    $( "#slider" ).slider({
    range:"min",
    min: 0,
    max: 100,
    value: 10,
    slide: function wynik( event, ui ) {
       $( "#price" ).val("$" + ui.value);
    }
    });
    $( "#price" ).val( "$" + $( "#slider" ).slider( "value") );
      var val = $('#slider').slider("value");
      if ( val &gt;= 20 ) {
         $("#priceText").text("first text");
      } else {
         $("#priceText").text("second text");
      }
  });
  </code></pre>
  
  <p>What is wrong here? </p>
  
  <p>I want to change a text in label: </p>
  
  <pre><code>&lt;p&gt;
  &lt;input type="text" id="price"&gt;
  &lt;label id="priceText" for="price"&gt;Some text to change&lt;/label&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>Input working correctly and show the value all the time in right way. But label doesn't change (only first time after refresh).</p>
  
  <p>I have read a lot of posts on SO before i post this one. For example: 
  <a href="https://stackoverflow.com/questions/2939865/how-to-get-value-from-jquery-ui-slider">How to get value from jQuery UI slider?</a> or <a href="https://stackoverflow.com/questions/12781322/how-to-get-value-from-input-with-dynamically-changed-value-by-jquery-ui-slider">How to get value from input with dynamically changed value by jquery UI slider?</a>
  But i can't get it done anyway. </p>