Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- //code below will be executed when the submit button being clicked
- $('form.appnitro').submit(function() {
- if($("#element_1").val() != "xyz"){
- $("#element_1").parentsUntil("ul").last().addClass("error").append('<p class="error">Incorrect text entered!</p>');
- //restore the submit button
- $("#li_buttons > input[type=submit],#li_buttons > input[type=image]").prop("disabled",false);
- //cancel the form submission
- return false;
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement