0
Copying a node in JavaScript without actually copying whole node
I want to copy a node <li> and append it to its parent element <ol> with onclick function The thing is inside main <li>, there is another <ol> and a button which does same thing, i.e appends a <li> element to <ol> with onclick function When I append the outer <li>, the whole first <li> is copied and appended as next <li>, But I do not want the inner list to have more than one element in second child of outer list. If I click on inner button 2-3 times and then append main <li> element as next child of outer list, the inner list of second child of outer list has 2-3 elements as same. I do not want that.
1 Resposta
+ 1
Did you know, that here cannot anything happends before you will link your code?