I added an onclick event in each list so to append at each lof them a new ul list with preffered list numbers as you can see (5-5-and 3)
The js code that i created is this:
var newList=document.createElement('ul');function leo(numberList){ for(var i=1;i<=numberList;i++){ var list=document.createElement('li'); list.innerHTML='This is a new list item'; newList.append(list); } newList.style.display='block'; return newList;} function event(e){ e.stopPropagation();}function extend(arg,leo){ arg.append(leo);}
The problem is that wherever i click a list element then the function append the past and the new list created elements into the last clicked element.
Img of the first list click: Img of the second click: And go on...
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.