9 Answers
New Answernote: the inbuilt IDE in sololearn does not recognise ...children(causing the cards to start from the 15th one), try running on personal ide to understand my question better https://code.sololearn.com/WITO1rlbovHf/?ref=app
1/27/2022 3:14:11 AM
loop9 Answers
New AnswerSolo's first reply is correct for the problem you're having with ...children, your code is trying to access the body of the document before is it is loaded. link below is quick read, it should help clear some up somethings https://www.sololearn.com/post/90825/?ref=app As far as your main problem the function swap is invoked when the blue button is clicked, the problem is with line 14. You need to change the logic of line 14 to include the skip button. https://code.sololearn.com/WKogRFAdof5c
First, your script needs to wait until the html document is fully loaded: onload=()=>{ // your code }
Solo i also tried that before bringing it here, didn't work... i think the problem is a combination of...wrong looping, wrong skip button selection & wrong way of calling the swap function on each of the skip button
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message