1/* header scroll */ 2 3$(document).scroll(function(){ 4 $('.header').toggleClass('header-scroll', $(this).scrollTop() > 25); 5 $('.welcome-icon').toggleClass('hide', $(this).scrollTop() > 50); 6}); 7 8 9/* scroll */ 10 11$(document).ready(function(){ 12 $(".scrolllink").click(function(e){ 13 var id = $(this).attr("href"); 14 if (id.match(/^\//)) return; 15 16 e.preventDefault(); 17 var offset = $(id).offset(); 18 19 $("html, body").animate({ 20 scrollTop: offset.top - 100 21 }, 1000); 22 }); 23}); 24 25 26/* menu */ 27 28$('.btn-menu').click(function() { 29 $(this).toggleClass('open'); 30 $('.phone-menu') 31 .fadeToggle('slow') 32 .find('.menu > li').each(function(i) { 33 $(this).delay((i++) * 100).fadeToggle(); 34 }); 35}); 36 37$('.phone-menu .menu .scrolllink').click(function() { 38 $('.btn-menu').toggleClass('open'); 39 $('.phone-menu') 40 .fadeToggle('slow') 41 .find('.menu > li').each(function(i) { 42 $(this).delay((i++) * 100).fadeToggle(); 43 }); 44}); 45 46 47/* form validation */ 48 49$("#form-contact").on("submit", function(e) { 50 var contactRequestsRef = new Firebase("https://100s-website.firebaseio.com/contact-requests"), 51 $form = $(this), 52 data = {}, 53 dataArray = $form.serializeArray(), 54 formMessage = $form.find('.form-message').empty().removeClass('error').removeClass('success'); 55 56 dataArray.forEach(function(kv) { 57 data[kv.name] = kv.value; 58 }); 59 60 contactRequestsRef.push(data, function(err) { 61 if (err) { 62 formMessage.addClass('error').text("Error when submitting message: " + err.message); 63 } else { 64 formMessage.addClass('success').text("We have received your message and will get back to you soon."); 65 } 66 }); 67 68 e.preventDefault(); 69}).validate();
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.