-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hay Reader!
I have tryde many of this loops of event lissener i want to have a modular system to add event loops. But it isent working. I tryed some wierd things to get around with this known problem but i cant find a way. So pleas help me if you have any idea how this gona work... Thanks allot. :->
greatings Leroy
*/
My Trys
//Days
// for (var i = 1; i < stundenPlan["days"].length; i++) {
// (function () {
// let p = i + 1;
// document.querySelector("#btn-"+ (i+1) +"").addEventListener("click", function(){
// console.log(beforeSubs);
// generateList(stundenPlan["days"][i]["subjects"], $before);
// });
// }());
// }
// var poi = 1;
// var testimonials = document.querySelectorAll('.day');
// Array.prototype.forEach.call(testimonials, function(elements, index) {
// poi++;
// document.querySelector("#btn-"+ poi +"").addEventListener("click", function(){
// console.log(beforeSubs);
// generateList(stundenPlan["days"][+(poi-1)+]["subjects"], $before);
// });
// });
// document.querySelectorAll('.day').forEach(function(button, index) {
// button.addEventListener('click', function() {
// generateList(stundenPlan["days"][(index-1)]["subjects"], $before);
// });
// });