diff options
Diffstat (limited to 'frontend/index.js')
-rw-r--r-- | frontend/index.js | 14 |
1 files changed, 13 insertions, 1 deletions
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); |