title: jQuery .val() not working when setting a variable
body: <p>If i have an input like so:</p>
  
  <pre><code>&lt;input type="text" id="textvalue" /&gt;
  </code></pre>
  
  <p>the following code will change its value:</p>
  
  <pre><code>$(document).ready(function() {
      $('#textvalue').val("hello");
  });
  </code></pre>
  
  <p>however the following will not work:</p>
  
  <pre><code>$(document).ready(function() {
      var = "hello";
      $('#textvalue').val(var);
  });
  </code></pre>
  
  <p>Why does the second one not work? I need to be able to change the value of the textbox to the value of a variable</p>