title: Create a cookie based on select menu option?
body: <p>I'm trying to create a select menu in a way that when users select an option and click on the continue button, a cookie is created with the contents of the option. The code directly below works, but it only creates the default "a" cookies rather than changing based on what option the user chooses.</p>
  
  <pre><code>&lt;select id='select_letter'&gt;
      &lt;option&gt;a&lt;/option&gt;
      &lt;option&gt;b&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;a href='/' id='continue'&gt;&lt;div id='continue_button'&gt;&lt;/div&gt;&lt;/a&gt;
  
  &lt;script&gt;
      $(document).ready(function(){
          var singleValues = $("#select_letter").val();
          $('#continue').click(function() {
              $.cookie("project", singleValues);
          })
      });
  &lt;/script&gt;  
  </code></pre>
  
  <p>I've tried to tie an onclick event to the continue button that gets whatever option has been selected, but it's been a fail. Any ideas? Thanks!</p>
  
  <pre><code>&lt;script&gt;
      $('option').live("click", function(){
          var singleValues = $("#select_letter").val();
          $('#continue').click(function() {
              $.cookie("project", singleValues);
          })
      });
  &lt;/script&gt;
  </code></pre>