title: Getting input values from tables with jQuery
body: <p>Right now, my HTML code looks like so:</p>
  
  <pre><code>&lt;div id="register"&gt;
  &lt;table class="tab2"&gt;
          &lt;tr&gt;
              &lt;td&gt;Email:&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" id="email" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Confirm Email:&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" id="confirmemail" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And to get the values from the inputs via jQuery, I have to do this:</p>
  
  <pre><code>$("#email").live('focusout', function() {
      email = $(this).val();
  });
  $("#confirmemail").live('focusout', function() {
      confirmemail = $(this).val();
  });
  </code></pre>
  
  <p>I know there are better solutions to perform this (as my solution <em>works</em>, but is messy since there's way more than two inputs), but they won't work for me. I'd like to use something like</p>
  
  <pre><code>$("#email").val();
  </code></pre>
  
  <p>and just retrieve the value as it's needed, rather than storing it to a variable. The issue is that whenever I run that code, it always returns an empty string. What would be the reason for that?</p>
  
  <p>EDIT:</p>
  
  <p>I forgot to mention that the values are being used after a click event is ran, like so:</p>
  
  <pre><code>$("#dialog_next").live('click', function() {
  </code></pre>
  
  <p>When I run the $("#email").val() code after that, it returns an empty string.</p>