diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-05 09:38:41 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-05 09:38:41 +0200 |
commit | a5e86699810f933444e3c3fbca3079d9caa362ae (patch) | |
tree | 3a9fe3914cbb2ef039dd5425201e801d16d343cd /public/static/collapse.js | |
parent | 19936c51bd4ac85c45e583f69f327e514dba99d4 (diff) |
update entire moreinfo header via javascript
Diffstat (limited to 'public/static/collapse.js')
-rw-r--r-- | public/static/collapse.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/public/static/collapse.js b/public/static/collapse.js index 1cd7341..15a0f8d 100644 --- a/public/static/collapse.js +++ b/public/static/collapse.js @@ -12,8 +12,9 @@ $(document).ready(function() { var trainElem = $(this); $('.moreinfo').each(function() { var infoElem = $(this); - $('.moreinfo .train-line').text(trainElem.data('train')); - $('.moreinfo .train-no').text(''); + $('.moreinfo .train-line').removeClass('bahn sbahn fern ext').addClass(trainElem.data('linetype')); + $('.moreinfo .train-line').text(trainElem.data('line')); + $('.moreinfo .train-no').text(trainElem.data('no')); $('.moreinfo .train-origin').text(trainElem.data('from')); $('.moreinfo .train-dest').text(trainElem.data('to')); $('.moreinfo .minfo').text(''); |