title: How to add jquery validation for dynamically appended input text box
body: <p>I need validate the dynamically appended input text box for the below code</p>
  
  <pre><code>$("#btnadd").click(function() {
               // Made it a local variable by using "var"
              var addkey = document.getElementById("txtaddkey").value;
              if(addkey!=""){
                  $('&lt;li&gt;&lt;span&gt;'+addkey+'&lt;/span&gt;&lt;span class=\"amountin\"&gt;&lt;a href=\"#\"&gt;$0.05&lt;/a&gt; $ &lt;input type=\"text\" maxlength=\"5\"/&gt;&lt;/span&gt;&lt;span class=\'close ui-icon \'&gt;&lt;/span&gt;&lt;/li&gt;')
                      .find('.close').click(function (){
                          $(this).parent().remove();  
                      })
                      .end().appendTo('#keyword');
                  $('#txtaddkey').val('');
              }
          });
  </code></pre>