title: How do I set a textbox's value using an anchor with jQuery?
body: <p>I have a textbox whose value I want to set based on the inner text of an anchor tag.  In other words, when someone clicks on this anchor:</p>
  
  <pre><code>&lt;a href="javascript:void();" class="clickable"&gt;Blah&lt;/a&gt;
  </code></pre>
  
  <p>I want my textbox to populate with the text "Blah".  Here is the code I am currently using:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $("a.clickable").click(function(event){
              $("input#textbox").val($(this).html());
          });  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>And in my html there is a list of anchor tags with the class "clickable" and one textbox with the id "textbox".</p>
  
  <p>I've substituted the code above with code to just show a javascript alert with $(this).html() and it seems to show the correct value.  I have also changed the $(this).html() to be a hardcoded string and it setes the textbox value correctly.  But when I combine them the textbox simply clears out.  What am I doing wrong?</p>