From 689c8cf469685e0f2bbef15c3d8d01e2c7f8848c Mon Sep 17 00:00:00 2001 From: Roman Gräf Date: Wed, 1 Nov 2017 13:37:19 +0100 Subject: Update default.js --- res/default.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/res/default.js b/res/default.js index ec78cfc..3cc642d 100644 --- a/res/default.js +++ b/res/default.js @@ -29,7 +29,6 @@ function open_timetable() { function onload() { $.getJSON("content/content.json", function(data){ - var el = $("#sidebar"); data.forEach((item)=>{ var load = item.load; var url = item.url; @@ -56,8 +55,8 @@ function onload() { atag.appendChild(texttag); atag.classList.add('button'); atag.classList.add('sidebar-button'); - el.appendChild(atag); + $("#sidebar").appendChild(atag); }); - el.lastChild.classList.add('sidebar-last'); + $("#sidebar").lastChild.classList.add('sidebar-last'); }); } -- cgit