JQuery Textarea val - created dynamic
<p>i am creating a textarea like this:</p>

<pre><code>var visit_detailSpan = $("&lt;span class='visit'&gt;Visits: (optional)&lt;/span&gt;");             
var visit = $("&lt;textarea rows='4' cols='40' class='visit' id='visit'&gt;&lt;/textarea&gt;");
</code></pre>

<p>now, i am  trying to get the value of the above textarea: when the user click on submit button: but i am getting <code>undefined</code></p>

<pre><code>var submitVisit = function(){  

            $.getJSON(
                options.ServiceUrl,
                {                    
                   ......,
                   ......,
                   visit: $('#visit').val()   //&lt;&lt;&lt;&lt;&lt;&lt;
                },
               function (response) { ... }                      

             );

        }
</code></pre>
