title: jQuery detect if form has a value to be submitted and jquery message plugin show
body: <p>jQuery detect if form has a value to be submitted and jQuery message plugin show. here is my code:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;form name="sample" method="post" action="test.php?success" autofocus id="sample"&gt;
              &lt;input type="text" id="text" class="text"&gt;
              &lt;input type="submit" id="submit" class="submit"&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>javascript:</p>
  
  <pre><code>$(document).ready(function() {
      $('#sample').submit(function(){
          $.ajax({  
        type: "POST",  
        url: 'test.php?success',
        data:$('#sample').serialize(),
        success: function() {  
            $.msg({ 
              fadeIn : 500,
              fadeOut : 200,
              timeOut : 800,
              content : 'Successfully Saved',
              css:{
                  border : '5px solid #C5C6C6',
                  background : '#EFFBFF',
              },
  
            })};
          });
          });
  })      
  </code></pre>