ming 3 vuotta sitten
vanhempi
commit
5d64dd5c76
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      index2.html

+ 1 - 3
index2.html

@@ -133,10 +133,8 @@
       document.getElementById("mySidenav").style.width = "0";
     }
     function load_data(id){
-      obj = loaded_data.find(item => item.id === id)
-      console.log(obj)
       var title = document.getElementById("title")
-      title.innerHTML = obj.name;
+      title.innerHTML = loaded_data.find(item => item.id === id).name
       var step;
       for (step = 1; step <= 10; step++) {
         $(".txtsrc"+step).val() = obj.text_content[step-1]