From 7e6bee76336412acf00c4fb1306b255cc4e9a1c1 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 24 Dec 2015 20:47:49 -0500 Subject: [PATCH] Clean + add popup handling --- js/animate.js | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/js/animate.js b/js/animate.js index 72ba7cd..c00d744 100644 --- a/js/animate.js +++ b/js/animate.js @@ -1,9 +1,9 @@ -$(window).ready(function() { - /*$('#page').fullpage({ - anchors:["landing","resume","getInTouch"] - });*/ +/* +* Typed.js animation for the landing panel. +*/ - var period = "."; +$(window).ready(function() { + var period = "."; var typedStrings = ["code"+period, "learn new things"+period, "tinker"+period, "communicate"+period, "teach"+period, "solve problems"+period, "get things done"+period]; $("#typedWords").typed({ @@ -16,8 +16,11 @@ $(window).ready(function() { loop: true, contentType: 'html' }); - }); +}); +/* +* Scroll on menu link click +*/ $(".menulink").click(function() { var $panel = $(this).attr("id"); @@ -27,3 +30,13 @@ $(".menulink").click(function() { scrollTop: $($panel).offset().top}, 'slow'); }); + +/* +* Closing the contact form popup +*/ + +$(document).click(function() { + if($("#contact-popup").is(':visible')) { + $("#contact-popup").fadeOut(); + } +}); \ No newline at end of file