1 2(function ($) { 3 "use strict"; 4 5 6 /*================================================================== 7 [ Validate ]*/ 8 var name = $('.validate-input input[name="name"]'); 9 var email = $('.validate-input input[name="email"]'); 10 var subject = $('.validate-input input[name="subject"]'); 11 var message = $('.validate-input textarea[name="message"]'); 12 13 14 $('.validate-form').on('submit',function(){ 15 var check = true; 16 17 if($(name).val().trim() == ''){ 18 showValidate(name); 19 check=false; 20 } 21 22 if($(subject).val().trim() == ''){ 23 showValidate(subject); 24 check=false; 25 } 26 27 28 if($(email).val().trim().match(/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{1,5}|[0-9]{1,3})(\]?)$/) == null) { 29 showValidate(email); 30 check=false; 31 } 32 33 if($(message).val().trim() == ''){ 34 showValidate(message); 35 check=false; 36 } 37 38 return check; 39 }); 40 41 42 $('.validate-form .input1').each(function(){ 43 $(this).focus(function(){ 44 hideValidate(this); 45 }); 46 }); 47 48 function showValidate(input) { 49 var thisAlert = $(input).parent(); 50 51 $(thisAlert).addClass('alert-validate'); 52 } 53 54 function hideValidate(input) { 55 var thisAlert = $(input).parent(); 56 57 $(thisAlert).removeClass('alert-validate'); 58 } 59 60 61 62})(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.