Advertisement
Guest User

Untitled

a guest
May 24th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.  
  3. $(":submit").click(function(){
  4.    
  5.     $('input:text').each(function(){
  6.        if($(this).val().length == 0) {
  7.           if($(this).attr('required') == 'true' ) {
  8.               $(this).attr("placeholder", "You must fill out this field!");
  9.               $(this).attr("style", "background: #FF0");
  10.           }
  11.        }
  12.     });
  13.  
  14.     $(this).html('Submitting . . . Please wait!');
  15.     $(this).attr('disabled','disabled');
  16.     //setTimeout(function() { $('#proc').submit(); }, 1000);
  17.     return true;});
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement