title: Input from textboxes not displaying in a jQuery UI Dialog box
body: <p>I am running into a problem where I want to display user input in a jQuery UI dialog box, but it isn't capturing any values. I know that the plugin works, but my code for displaying user input from textboxes in the dialog box seems to be shoddy. I commented out the code which breaks the plugin in my <a href="http://jsfiddle.net/TR6gy/" rel="nofollow">JSFiddle</a>. I basically want whatever data the user puts in the textboxes to be displayed in empty divs that I created within the plugin confirmation window.</p>
  
  <p>HTML:</p>
  
  <pre><code>First Name: &lt;input type="text" id="name"&gt;
  &lt;br&gt;
  Last Name: &lt;input type="text" id="last"&gt;
  &lt;br&gt;
  &lt;input type="submit" id="button" value="Activate Plugin"&gt;
  
  &lt;div id="dialog" title="Confirmation"&gt;Please confirm that the following information is correct: &lt;br&gt;
  First Name: &lt;div id="firstinput"&gt;&lt;/div&gt;
  Last Name: &lt;div id="lastinput"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Working jQuery plugin code with commented out non-working code:</p>
  
  <pre><code>     $(document).ready(function() {
            $('#dialog').dialog({
                autoOpen: false,
                width: 600,
                buttons: {
                    "Correct": function() {
                        $(this).dialog("close");
                    },
                    "Incorrect": function() {
                        $(this).dialog("close");
                    }
                }
            });
  
            $('#button').click(function() {
                $('#dialog').dialog('open');
                return false;
            });
        });
        /*INPUT FROM TEXTBOXES DISPLAYING IN THE PLUGIN CONFIRMATION WINDOW LOGIC
        $(document).ready(function () {
            if $("#first").val() {
                $(this).appendTo("#firstinput");
            }
            else if ("#last").val() {
                $(this).appendTo("#lastinput");
            };
        });*/
  </code></pre>
  
  <p>I would really appreciate it if someone took a look at my <a href="http://jsfiddle.net/TR6gy/" rel="nofollow">fiddle</a> and gave me an idea of what I might be doing wrong. Thanks.</p>