diff options
author | Arunvel Sriram <arunvelsriram@gmail.com> | 2019-05-26 21:59:19 +0300 |
---|---|---|
committer | Arunvel Sriram <arunvelsriram@gmail.com> | 2019-05-26 21:59:19 +0300 |
commit | a8fb434c01104c35f097e93f5253ad35deb32e3c (patch) | |
tree | ac114c288f51dfc32c053292fa63ccb631f4f721 | |
parent | 0e8e59ac104b00e8c0a093357894053621bf0d25 (diff) |
Format code
-rw-r--r-- | static/js/main.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/static/js/main.js b/static/js/main.js index 8f9bb0c..2f1d09b 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -16,24 +16,24 @@ let menuBtn = $("#menuBar"); -menuBtn.click(function(){ +menuBtn.click(function() { $('.hamburger-menu').toggleClass('animate'); - if($(".secondaryMenu").hasClass("active")){ - + if ($(".secondaryMenu").hasClass("active")) { + $(".secondaryMenu").removeClass("active"); - setTimeout(function(){ + setTimeout(function() { $(".primaryMenu").addClass("active"); - },400); + }, 400); + - } else { $(".primaryMenu").removeClass("active"); - - setTimeout(function(){ + + setTimeout(function() { $(".secondaryMenu").addClass("active"); - },350); + }, 350); } }); @@ -46,18 +46,18 @@ function scrollTo(target) { $("html, body").animate({ scrollTop: top }, duration, changeHash); } -$(document).ready(function(){ +$(document).ready(function() { var elements = $(".sidebar > .main-info *"); console.log(elements); - for(let i = 0; i < elements.length; i++){ - setTimeout(function(){ + for (let i = 0; i < elements.length; i++) { + setTimeout(function() { $(elements[i].tagName).addClass("bs"); - }, (400 * i) - 90 * i ); + }, (400 * i) - 90 * i); } - setTimeout(function(){ + setTimeout(function() { $(".main-content").addClass("active"); }, 1900); |