1jQuery(function($){ 2 $('#submitted').click(function(){ 3 4 valid = true; 5 var name = $('#contactName'); 6 var subject = $('#contactSubject'); 7 var email = $('#email'); 8 var message = $('#commentsText'); 9 var antispam = $('#antispam'); 10 11 if(antispam.val() != ''){ 12 valid = false; 13 } 14 15 if(name.val() == ''){ 16 name.parent().addClass('error'); 17 name.next('div').show(); 18 valid = false; 19 name.focus(function(){ 20 name.next('div').fadeOut(); 21 name.parent().removeClass('error'); 22 }); 23 } 24 25 if(subject.val() == ''){ 26 subject.parent().addClass('error'); 27 subject.next('div').show(); 28 valid = false; 29 subject.focus(function(){ 30 subject.next('div').fadeOut(); 31 subject.parent().removeClass('error'); 32 }); 33 } 34 35 if(message.val() == ''){ 36 message.parent().addClass('error'); 37 message.next('div').show(); 38 valid = false; 39 message.focus(function(){ 40 message.next('div').fadeOut(); 41 message.parent().removeClass('error'); 42 }); 43 } 44 45 if(email.val() == ''){ 46 email.parent().addClass('error'); 47 email.next().next('div').hide(); 48 email.next('div').show(); 49 valid = false; 50 email.focus(function(){ 51 email.next('div').fadeOut(); 52 email.parent().removeClass('error'); 53 }); 54 }else if( !email.val().match(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/) ){ 55 email.parent().addClass('error'); 56 email.next('div').hide(); 57 email.next().next('div').show(); 58 valid = false; 59 email.focus(function(){ 60 email.next().next('div').fadeOut(); 61 email.parent().removeClass('error'); 62 }); 63 } 64 65 return valid; 66 }); 67 68});
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.