1( function($) { 2 'use strict'; 3 4 5 /*------------------------------------------------------------------------------- 6 Ajax Form 7 -------------------------------------------------------------------------------*/ 8 9 $('.submit').on('click', function(){ 10 if($('#name').val() != '' && $('#email').val() != ''){ 11 $(".success-message").show(); 12 $(".error-message").hide(); 13 } 14 }); 15 16 17 $('.submit').on('click', function(){ 18 if($('#name').val() == ''){ 19 $("#name").addClass("required"); 20 $(".error-message").show(); 21 } 22 else { 23 $("#name").removeClass("required"); 24 } 25 if($('#email').val() == ''){ 26 $("#email").addClass("required"); 27 $(".error-message").show(); 28 } 29 else { 30 $("#email").removeClass("required"); 31 } 32 }); 33 34 35 36 // if ($('.js-ajax-form').length) { 37 // $('.js-ajax-form').each(function(){ 38 // $(this).validate({ 39 // errorClass: 'error wobble-error', 40 // submitHandler: function(form){ 41 // $.ajax({ 42 // type: "POST", 43 // url:"http://localhost/next-property/wp-comments-post.php", 44 // data: $(form).serialize(), 45 // success: function() { 46 // $('.col-message, .success-message').show(); 47 // }, 48 49 // error: function(){ 50 // } 51 // }); 52 // } 53 // }); 54 // }); 55 // } 56})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.