Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 2
Need some help at Js.
I have cloned an element which itself has elements, now I want to change those element into other colors in the cloned element. How can I do so? Thanks for answering. https://code.sololearn.com/W6cTg2U5PRJg/?ref=app
2 Réponses
+ 3
Here's a solution:
https://code.sololearn.com/WBhTCSRofRoA/?ref=app
I used the parent element of the clone to change the background of each child nodes.
Another solution for that is by adding class name to each child node instead of adding style directly in js incase you want to add additional styles to the clones.
+ 2
Thanks a lot @Jonathan