From a00c0aab1eb5a7a55bef8ca08115bdd722ab5699 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 16 May 2021 19:50:15 -0400 Subject: Moved the frontend directory up so that it no longer exists --- index.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 index.js (limited to 'index.js') diff --git a/index.js b/index.js new file mode 100644 index 0000000..e05b25c --- /dev/null +++ b/index.js @@ -0,0 +1,28 @@ +/// + +(function() { + function main() { + + // Retrieve the navbar + $.get('/navbar.html', function(pData) { + $('nav').html(pData); + + // Set selected tab as selected + $('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