1jQuery(function($) { 2 var vw,vh; 3 var breakpoint = new Object(); 4 breakpoint.small = 420; 5 breakpoint.medium = 768; 6 breakpoint.large = 1024; 7 breakpoint.xlarge = 1600; 8 9 var wpcf7 = $('.wpcf7'), 10 bgs = $('[data-background]'); 11 12 function contactSent(event){ 13 $('#contact_spinner').removeAttr('class'); 14 var waitforit = setTimeout( function(){ 15 var response = $('.wpcf7-response-output'); 16 var targets = $('.wpcf7-form').find('> *:not(.wpcf7-response-output)'); 17 $(targets).hide(); 18 wpcf7.animate({'opacity':1}, 300); 19 console.log(response); 20 response.removeClass('hide').removeClass('wpcf7-display-none'); 21 }, 300); 22 } 23 24 function contactSubmit(event){ 25 wpcf7.stop().animate({'opacity':0}, 300, function(){ 26 $(this).find('[type="submit"]').hide(); 27 }); 28 $('#contact_spinner').attr('class','active'); 29 } 30 31 function contactErrors(event){ 32 var stagger = setTimeout(function(){ 33 $('#contact_spinner').removeAttr('class'); 34 var msg = $('.wpcf7-response-output.wpcf7-spam-blocked').html(); 35 var invalids = $('[aria-invalid="true"]'); 36 if( msg ) { 37 $('input[name="email"]').after('<span role="alert" class="wpcf7-not-valid-tip">'+msg+'</span>'); 38 } 39 invalids.each(function(){ 40 var txt = $(this).siblings('.wpcf7-not-valid-tip').html(); 41 $(this).attr('placeholder', txt); 42 if($(this).val() !== '') $(this).val(''); 43 }); 44 wpcf7.stop().find('[type="submit"]').show(); 45 wpcf7.animate({'opacity':1}, 300); 46 }, 200); 47 } 48 49 function setSize(){ 50 vw = $(window).width(); 51 vh = $(window).height(); 52 } 53 54 function getSize(){ 55 var size = 'small'; 56 if(vw >= breakpoint.xlarge){ 57 size = 'fullsize'; 58 }else if(vw >= breakpoint.large && vw < breakpoint.xlarge) { 59 size = 'large'; 60 }else if(vw >= breakpoint.medium && vw < breakpoint.large) { 61 size = 'medium'; 62 } 63 return size; 64 } 65 66 setSize(); 67 68 bgs.each(function(){ 69 var size = getSize(), 70 img = $(this).find('img'); 71 72 if(img.length > 0) { 73 var src = $(img).attr('data-src'); 74 if($(img).attr('data-src-xlarge') && size == 'xlarge') src = $(img).attr('data-src-xlarge'); 75 if($(img).attr('data-src-large') && size == 'large') src = $(img).attr('data-src-large'); 76 $(this).css('background-image','url('+src+')'); 77 } 78 }); 79 80 $('.wpcf7 .wpcf7-response-output').addClass('hide'); 81 82 if(wpcf7) { 83 wpcf7.on( 'wpcf7invalid', contactErrors ); 84 wpcf7.on( 'wpcf7mailsent', contactSent ); 85 wpcf7.find('input[type="submit"]').on( 'click.contactSubmit', contactSubmit ); 86 } 87});
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.