0

Is it possible to this in JS? Tried it a few different ways

Hi! I'm working with an offshoot of Sololearn example code. It's a lesson on taking the elements of a div and replacing them with a single string. I was thinking of a spin on it, taking the contents of one div and its children and replacing them with the contents, 10 children of the second div. Is this possible in JS? If so, can someone guide me in the right direction? https://code.sololearn.com/WINhGZQOiGAy/#js https://code.sololearn.com/WINhGZQOiGAy/#html

11th Apr 2019, 2:49 AM
OrangeSword0999
OrangeSword0999 - avatar
2 Answers
+ 5
To run a function when window load use: window.onload = () => yourfunction();
11th Apr 2019, 3:25 AM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar
0
Okay, but how does that help swap Div contents? I don't understand
12th Apr 2019, 3:04 AM
OrangeSword0999
OrangeSword0999 - avatar