title: How to show success message after validation
body: <p><br/>
  I want to valid some fields and I want to show success message <b>$('.alert-success').show();</b> after user entered all values.<br/>
  I tried here <strong><a href="http://jsfiddle.net/sureshpattu/6s3nn/" rel="nofollow">jsfiddle</a></strong> Now I am able to validate all fields but I don't know how to show success message if all fields are not null.<br/>
  Html:</p>
  
  <pre><code>&lt;div class="contentContainer"&gt;
      &lt;div class="alert alert-success hide"&gt;Form submitted successfully&lt;/div&gt;
                          &lt;div id="basicInfo"&gt;
                              &lt;div class="toggleContentInnerSec"&gt; 
                               &lt;div class="row-fluid"&gt;
                                   &lt;div class="span7"&gt;
  
                                   &lt;label&gt;First Name&lt;/label&gt; &lt;br&gt; 
                                   &lt;p class="hide firstNameErrorMsg error"&gt;Please enter first name&lt;/p&gt;
                                   &lt;input type="text" name="borrowerBasicDetail.firstName" value="" id="addBorrowers_borrowerBasicDetail_firstName" class="access required" placeholder="Example: 'Sachin' " data-errormsg="firstNameErrorMsg"&gt; &lt;br&gt;
                                   &lt;label&gt;Last Name&lt;/label&gt; &lt;br&gt;
                                   &lt;p class="hide lastNameErrorMsg error"&gt;Please enter last name&lt;/p&gt; 
                                   &lt;input type="text" name="borrowerBasicDetail.lastName" value="" id="addBorrowers_borrowerBasicDetail_lastName" class="access required" placeholder="Example: 'Tendulkar' " data-errormsg="lastNameErrorMsg"&gt; &lt;br&gt;
                                   &lt;label&gt;Date Of Birth&lt;/label&gt; &lt;br&gt; 
                                   &lt;p class="hide birthDayErrorMsg error"&gt;Please enter date of birth&lt;/p&gt;
                                   &lt;input type="text" name="borrowerBasicDetail.age" value="" id="addBorrowers_borrowerBasicDetail_age" class="access required" placeholder="DD/MM/YYYY" data-errormsg="birthDayErrorMsg"&gt; &lt;br&gt;
  
                               &lt;/div&gt; 
                           &lt;/div&gt;
  
                           &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="row-fluid pull-left"&gt;
                               &lt;div class="form-actions"&gt;
                                  &lt;a class="btn btn-success btn-large" id="tabOneSubmit"&gt;Submit&lt;/a&gt;
                               &lt;/div&gt;
                          &lt;/div&gt;
  
                      &lt;/div&gt;
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>submit();
  
  function submit(){
      $('#tabOneSubmit').click(function(){
          $('.required').each(function(){
              var element=$(this);
              var elementVal=$(this).val();
              var errorMsgId=element.attr('data-errorMsg');
              if(elementVal==''){
                  $('.'+errorMsgId).show();
                  element.addClass('errorField');
              }
              else{
                  $('.'+errorMsgId).hide();
                  element.removeClass('errorField');
                  }
          });
  
      });
  }
  </code></pre>