title: jQuery on blur not working properly
body: <p>I have a simple educational details page where I am generating textboxes dynamically to enter qualification details. When I try to validate the textboxes, the validation gets fired but not properly. If I try it 2-3 times then it becomes proper. In the first attempt alternate textboxes get validated. When I click on "add row" button a new row gets added but when I try to validate it for 2-3 attempts the validation error is not shown. After few more attempts the validation works. It is all very confusing. </p>
  
  <p>I researched a lot on the internet but could not find any proper solution. </p>
  
  <p>I have pasted my full JSP below. Will be really really thankful for any pointers. </p>
  
  <pre><code> &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
          &lt;title&gt;Enter Details&lt;/title&gt;
  
          &lt;link rel="stylesheet" type="text/css" href="../css/jquery.validate.css" /&gt;
          &lt;link rel="stylesheet" type="text/css" href="../css/style.css" /&gt;
  
          &lt;script src="../js/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="../js/jquery-1.9.1.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="../js/jquery.validate.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="../js/jquery.validation.functions.js" type="text/javascript"&gt;&lt;/script&gt;
         &lt;script type="text/javascript"&gt;       
         $(document).ready(function(){
         jQuery(".validate-text").on("blur", function (event) {
             setTimeout(function() {
                 jQuery(".validate-text").validate({
              expression: "if (VAL) return true; else return false;",
              message: "Please enter value."
              }); });
      });
         jQuery(".validate-num").on("blur", function (event) {
             setTimeout(function() {
                 jQuery(".validate-num").validate({
              expression: "if (!isNaN(VAL) &amp;&amp; VAL) return true; else return false;",
              message: "Please enter value."
              });
             });
      });
         });
          &lt;/script&gt;
          &lt;script type="text/javascript"&gt;
  
          $(document).ready(function(){
  
           $("#addRow").click(function() {
              var i=0;
              i= $("#countHd").val();
              i= parseInt($("#countHd").val(),10); 
               $("table").append('&lt;tr&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" class="validate-text" name="courseTxt'+i+'" id="courseTxt'+i+'" /&gt;&lt;/td&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" class="validate-text" name="boardTxt'+i+'" id="boardTxt'+i+'" /&gt;&lt;/td&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" class="validate-num"  style="width: 80px;" name="marksTxt'+i+'" id="marksTxt'+i+'" /&gt;&lt;/td&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" class="validate-num"  style="width: 80px;" name="totalTxt'+i+'" id="totalTxt'+i+'"  /&gt;&lt;/td&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" style="width: 80px;" name="percentageTxt'+i+'" id="percentageTxt'+i+'" style="width: 80px;"  /&gt;&lt;/td&gt;'+
                      '&lt;td class="MasterTabletd"&gt;&lt;input type="text" class="validate-text"  style="width: 80px;" name="classTxt'+i+'" id="classTxt'+i+'"  /&gt;&lt;/td&gt;'+
                  '&lt;/tr&gt;');
               i=i+1;
               $("#countHd").val(i); 
              });
          });
  
  
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div id="contain"&gt;
  
  &lt;div id="header"&gt;
  &lt;h3&gt;Enter Details&lt;/h3&gt;
  &lt;/div&gt;
  
  &lt;form id="personalDetails" class="MasterForm" method="post"
      action="AddPersonalDetails.php"&gt;
  &lt;table class="MasterTable"&gt;
      &lt;tr&gt;&lt;td class="MasterTabletd"&gt;
      &lt;input type="button" name="addRow" id="addRow" class="submitbutton" value="Add Row" /&gt;&lt;/td&gt;
      &lt;td class="MasterTabletd"&gt;
      &lt;input type="submit" name="educational" id="educational" class="submitbutton" value="Submit" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
      &lt;td&gt;Course Name&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;Board / University&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;Marks Obtained&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;Total Marks&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;Percentage&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;Year of Completion&lt;span class="required"&gt;*&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="courseTxt" id="courseTxt" class="validate-text" /&gt;&lt;/td&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="boardTxt" id="boardTxt" class="validate-text" /&gt;&lt;/td&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="marksTxt" id="marksTxt" class="validate-num" /&gt;&lt;/td&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="totalTxt" id="totalTxt" class="validate-num" /&gt;&lt;/td&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="percentageTxt" id="percentageTxt" /&gt;&lt;/td&gt;
          &lt;td class="MasterTabletd"&gt;&lt;input type="text" name="classTxt" id="classTxt" class="validate-text"  /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type="hidden" name="countHd" id="countHd" value="1" /&gt;
  &lt;/form&gt;
  &lt;/div&gt;      
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>