ming vor 3 Jahren
Ursprung
Commit
abbe7bac49
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      index2.html

+ 4 - 3
index2.html

@@ -135,14 +135,15 @@
     function load_data(id){
       var title = document.getElementById("title")
       console.log(id)
-      title.innerHTML = loaded_data.find(item => item.id === 4).name
+      tid = 4
+      title.innerHTML = loaded_data.find(item => item.id === tid).name
       var step;
       for (step = 1; step <= 10; step++) {
-        $(".txtsrc"+step).val(loaded_data.find(item => item.id === 4).text_content[step-1]) 
+        $(".txtsrc"+step).val(loaded_data.find(item => item.id === tid).text_content[step-1]) 
       }
       var step2;
       for (step2 = 1; step2 <= 10; step2++) {
-        $(".imgsrc"+step2).val(loaded_data.find(item => item.id === 4).image_urls[step-1]) 
+        $(".imgsrc"+step2).val(loaded_data.find(item => item.id === tid).image_urls[step-1]) 
       }
       
     }