From fbb91c3a82808e91c759ad70a7ae962f72b7b669 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Mon, 18 Jul 2016 12:07:15 +0200 Subject: [PATCH] fancy fades! \o/ --- content/cammie.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/cammie.coffee b/content/cammie.coffee index 3a64eec..da88a1e 100644 --- a/content/cammie.coffee +++ b/content/cammie.coffee @@ -4,3 +4,12 @@ $('.ctrl').click -> command: $(this).attr("command") posX: $(this).attr("posX") posY: $(this).attr("posY") + +$('.ctrl').hide() + +timeout = null + +$('.fullpage').mousemove (event) -> + clearTimeout(timeout) if timeout + $('.ctrl').fadeIn() + timeout = setTimeout (-> $('.ctrl').fadeOut()), 3000