title: Changing div width using JQuery UI slider
body: <p>I am trying to dynamically change the width of a div using a slider.
  I get the element ID by using a click function.
  I then pass this ID into a variable.
  I use this variable to determine which element ID i am adjusting
  Everything works fine except for the last line. Nothing happens and no errors.</p>
  
  <p>Just to clarify a little more, in the JS fiddle when you drag it will update the selected element. How do i bring that element into the slider to adjust its width?
  I have tried getting the id attribute of the element and storing it in a global variable and then calling that variable in the slider and updating its CSS.
  <a href="http://jsfiddle.net/8enwc69j" rel="nofollow">JSFiddle</a></p>
  
  <p>UPDATE:
  Solved! I should have added a class onto the selected element instead of trying to store it in a variable.
      var divHolder // holds element from click function</p>
  
  <pre><code>$('#changeWidth').slider({
      value: 0,
      slide: function(event, slider) {
  
      var theSliderValue = slider.value + "%";
      alert(divHolder); // Returns the div id i wanted
      $("#divHolder").css("width", theSliderValue);
    }
  });
  </code></pre>