title: how to move the slider according to value retrieved from database ? Jquery ui Slider
body: <p>I have an option where the data is retrieved from the database and i need to position the slider according to the data retrieved.</p>
  
  <p>For example</p>
  
  <p>if the range is between 1 and 100 the retrieved data is 50 then the slider button should be in the center.</p>
  
  <p>Here is the code i am using. I dont get the slider to point to value retrieved. Its showing at min value</p>
  
  <pre><code>var j$ = jQuery.noConflict();
      j$(function() {
          j$( "#slider-range-min" ).slider({
  
              value: "{!avghoursperday}",// this is wat i am getting from salesforce DB
              min: 1,
              max: 100,
              slide: function( event, ui ) {
                  j$( "#slider-range-min" ).next().val(ui.value );
              }
          });
          j$( "#slider-range-min" ).next().val(  j$( "#slider-range-min" ).slider( "value"      )      );
      });
  </code></pre>