From 2d7c52e10b7e97a5bd09d262996a04aecd553a73 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 7 Aug 2018 17:00:10 +0200 Subject: [PATCH] don't scroll top on station click --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index ad13564..64b7d43 100644 --- a/js/main.js +++ b/js/main.js @@ -65,7 +65,8 @@ $(function(){ /===============*/ /* Click on a radio station (table entry) and play it */ - $('body').on('click', '.filename', function() { + $('body').on('click', '.filename', function(e) { + e.preventDefault(); var stationid = $(this).parent().attr('data-id'); var stationname = $(this).parent().find('.nametext').text(); action_play(stationid);