From f4dbe98f2ef04edbc919d0cf0bb9fa16c3951c5e Mon Sep 17 00:00:00 2001 From: Ricky Barfield Date: Wed, 21 Feb 2024 12:08:39 -0700 Subject: [PATCH] deleted a bunch of old code that was commented out --- public/assets/js/fitnessApp.js | 2 +- public/assets/js/main.js | 71 ---------------------------------- 2 files changed, 1 insertion(+), 72 deletions(-) diff --git a/public/assets/js/fitnessApp.js b/public/assets/js/fitnessApp.js index cca2967..5af738c 100644 --- a/public/assets/js/fitnessApp.js +++ b/public/assets/js/fitnessApp.js @@ -93,7 +93,7 @@ function populateExerciseBank () { function populateBankInfo (prop) { // converts variable property from classList into an expression - const {photo, instructions, video, muscleGroups} = eval(`exercises.` + `${prop}`) + const {photo, instructions, video, muscleGroups} = eval(`exercises.${prop}`) document.querySelector('.bankInfoExerciseTitle').innerText = prop.replaceAll('_', ' ') document.querySelector('.bankImg').src = photo diff --git a/public/assets/js/main.js b/public/assets/js/main.js index 77cbc31..f50fa46 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -40,7 +40,6 @@ var $nav = $('#nav'); if ($nav.length > 0) { - // Shrink effect. $main .scrollex({ @@ -53,77 +52,7 @@ }, }); - // // Links. - // var $nav_a = $nav.find('a'); - - // $nav_a - // .scrolly({ - // speed: 1000, - // offset: function() { return $nav.height(); } - // }) - // .on('click', function() { - - // var $this = $(this); - - // // External link? Bail. - // if ($this.attr('href').charAt(0) != '#') - // return; - - // // Deactivate all links. - // $nav_a - // .removeClass('active') - // .removeClass('active-locked'); - - // // Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section). - // $this - // .addClass('active') - // .addClass('active-locked'); - - // }) - // .each(function() { - - // var $this = $(this), - // id = $this.attr('href'), - // $section = $(id); - - // // No section for this link? Bail. - // if ($section.length < 1) - // return; - - // // Scrollex. - // $section.scrollex({ - // mode: 'middle', - // initialize: function() { - - // // Deactivate section. - // if (browser.canUse('transition')) - // $section.addClass('inactive'); - - // }, - // enter: function() { - - // // Activate section. - // $section.removeClass('inactive'); - - // // No locked links? Deactivate all links and activate this section's one. - // if ($nav_a.filter('.active-locked').length == 0) { - - // $nav_a.removeClass('active'); - // $this.addClass('active'); - - // } - - // // Otherwise, if this section's link is the one that's locked, unlock it. - // else if ($this.hasClass('active-locked')) - // $this.removeClass('active-locked'); - - // } - // }); - - // }); - } - // Scrolly. $('.scrolly').scrolly({ speed: 1000