diff options
author | Roman Gräf <roman.graef@gmail.com> | 2017-11-01 13:38:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 13:38:43 +0100 |
commit | 2c0acb0b6e3b7dd7b5cde7188ee61d81bad9eabd (patch) | |
tree | 5ffa291918a1a84e2f415e3d84a23655986151b5 | |
parent | 689c8cf469685e0f2bbef15c3d8d01e2c7f8848c (diff) | |
download | ichtml-2c0acb0b6e3b7dd7b5cde7188ee61d81bad9eabd.tar.gz ichtml-2c0acb0b6e3b7dd7b5cde7188ee61d81bad9eabd.tar.bz2 ichtml-2c0acb0b6e3b7dd7b5cde7188ee61d81bad9eabd.zip |
Update default.js
-rw-r--r-- | res/default.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/res/default.js b/res/default.js index 3cc642d..42ad358 100644 --- a/res/default.js +++ b/res/default.js @@ -29,6 +29,7 @@ function open_timetable() { function onload() {
$.getJSON("content/content.json", function(data){
+ var el = $("#sidebar")[0];
data.forEach((item)=>{
var load = item.load;
var url = item.url;
@@ -55,8 +56,8 @@ function onload() { atag.appendChild(texttag);
atag.classList.add('button');
atag.classList.add('sidebar-button');
- $("#sidebar").appendChild(atag);
+ el.appendChild(atag);
});
- $("#sidebar").lastChild.classList.add('sidebar-last');
+ el.lastChild.classList.add('sidebar-last');
});
}
|