title: Error : cannot call methods on slider prior to initialization attempted to call method 'value'
body: <p>I have written something like below. onclick of div with id "PLUS" I
   am getting the following error:  </p>
  
  <p><code>cannot call methods on slider prior to initialization attempted to call method 'value'</code></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="PLUS" class="PLUS"&gt;&lt;/div&gt;
  &lt;script&gt;
    $(function() {
      $(".slider").slider({
        animate: true,
        range: "min",
        value: 18,
        min: 18,
        max: 70,
        step: 1,
        slide: function(event, ui) {
          $("#slider-result").html(ui.value);
          document.getElementById(findElement('ageId')).value = ui.value;
        },
        //this updates the hidden form field so we can submit the data using a form
        change: function(event, ui) {
          $('#hidden').attr('value', ui.value);
        }
      });
  
      $(".PLUS").click(function() {
        var value = $("#slider-result").slider("value"),
          step = $("#slider-result").slider("option", "step");
        $("#slider-result").slider("value", value + step);
      });
  
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help is appreciated.</p>