Skip to content

Instantly share code, notes, and snippets.

@Maxghp
Last active March 22, 2016 14:13
Show Gist options
  • Select an option

  • Save Maxghp/703d9e2d678031c0bc47 to your computer and use it in GitHub Desktop.

Select an option

Save Maxghp/703d9e2d678031c0bc47 to your computer and use it in GitHub Desktop.
$("body").on("click", ".edit-job", function(){
//validation for all fields
var valid = true;
$('#form-with-customs input').each( function(){
if($.trim($(this).val()) == ''){
valid = false;
}
});
if(!valid) {
$('.error-valid').html('All fields must be full')
.css('color','red')
.animate({'paddingLeft':'10px'},400)
.animate({'paddingLeft':'5px'},400);
return false;
} else {
$('.error-valid').html("")
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment