title: Object doesn't support property or method 'slider' (jquery in Sharepoint 2010)
body: <p>I'm getting the error Object doesn't support property or method 'slider' when loading my Sharepoint page.</p>
  
  <p>I'm running this function on page load</p>
  
  <pre><code>function sliderFunctionality() {
  $("#sliderdiv").css("background-color", "#ccc");
  $("#sliderdiv").slider({
      value: 0,
      min: 0,
      max: 5,
      step: 1,
      slide: function (event, ui) {
          $("#amount").val("$" + ui.value);
      }
  });
  $("#amount").val("$" + $("#sliderdiv").slider("value"));
  alert('testing.....');
  };
  </code></pre>
  
  <p>Here is my webpart code</p>
  
  <pre><code>protected override void CreateChildControls()
      {
          //REGISTER STYLESHEETS
          CssRegistration.Register("/_layouts/STYLES/Stylesheet1.css");
  
          //REGISTER JAVASCRIPT LIBRARIES
          ScriptLink.Register(this.Page, "/_layouts/SCRIPTS/jquery-1.7.1.min.js", false);
          ScriptLink.Register(this.Page, "/_layouts/SCRIPTS/jquery.SPServices-0.7.0.min.js", false);
          ScriptLink.Register(this.Page, "/_layouts/SCRIPTS/JScript1.js", false);
  
          this.Controls.Add(new LiteralControl("&lt;label for='amount'&gt;Donation amount ($50 increments):&lt;/label&gt;"));
          this.Controls.Add(new LiteralControl("&lt;p&gt;&lt;input type='text' id='amount' style='border:0; color:#f6931f; font-weight:bold;' /&gt;"));
          this.Controls.Add(new LiteralControl("&lt;div id='sliderdiv'&gt;here&lt;/div&gt;&lt;/p&gt;"));
  
          this.ChildControlsCreated = true;
      }
  </code></pre>
  
  <p>The change of css background colour works but the slider doesn't.  So jquery is working fine on the page and the DIV is being found.</p>
  
  <p>Why is slider not working?  I'm using jquery 1.7.1 </p>