diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-27 18:36:35 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-27 18:36:35 +0200 |
commit | adb830baa9cba8b02defdb63dbd1a2cf43998dc4 (patch) | |
tree | 35280814977f60e5b44ea3187dbde24ff8a8cf37 /public/static/js/travelynx-actions.js | |
parent | 357efdae358e8ed28c223c871802e419fcd2aa00 (diff) | |
parent | 7bf99b00a5064d231641b1309adacf6f1e8f42cb (diff) |
Merge branch 'deingithub-dep-board-ui'
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r-- | public/static/js/travelynx-actions.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index e4d69dc..52ca482 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -298,6 +298,20 @@ $(document).ready(function() { $('a[href]').click(function() { $('nav .preloader-wrapper').addClass('active'); }); + $('a[href="#now"]').keydown(function(event) { + // also trigger click handler on keyboard enter + if (event.keyCode == 13) { + event.preventDefault(); + event.target.click(); + } + }); + $('a[href="#now"]').click(function(event) { + event.preventDefault(); + $('nav .preloader-wrapper').removeClass('active'); + now_el = $('#now')[0]; + now_el.previousElementSibling.querySelector(".dep-time").focus(); + now_el.scrollIntoView({behavior: "smooth", block: "center"}); + }); const elems = document.querySelectorAll('.carousel'); const instances = M.Carousel.init(elems, { fullWidth: true, |