From c36d05d5aed2f8f7c6342b174692146e2d11c386 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Mon, 22 Mar 2021 20:54:51 -0400 Subject: Refactored frontend, beginnings of general cpp layer, and beginning roadmap --- frontend/index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'frontend/index.js') diff --git a/frontend/index.js b/frontend/index.js index 85b3fe6..e05b25c 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -2,7 +2,8 @@ (function() { function main() { - + + // Retrieve the navbar $.get('/navbar.html', function(pData) { $('nav').html(pData); @@ -10,6 +11,17 @@ $('nav').find('a').removeClass('nav-selected'); $('nav').find('a[href="' + window.location.pathname + '"').addClass('nav-selected'); }); + + // Set up show/hide functionality on the play/stop buttons + $('.play_button').on('click', function() { + $(this).hide(); + $(this).parent().find('.stop_button').show(); + }); + + $('.stop_button').on('click', function() { + $(this).hide(); + $(this).parent().find('.play_button').show(); + }); } $(document).ready(main); -- cgit v1.2.1