0

Please help me. I Am trying to get is code to bring up my questions but its not working

https://code.sololearn.com/WXf0wSSizMMJ/?ref=app

12th Jul 2019, 9:50 PM
Anthony Cotto
Anthony Cotto - avatar
6 ответов
0
Example: insert this code to the <button>openning tag: onclick=loadQuestion() (this will call the function when the button was clicked)
13th Jul 2019, 2:50 AM
Thống Nguyễn
Thống Nguyễn - avatar
0
There are some bugs: #1: set jquery <link> inside your <head> tag #2: in the html code turn the <div class="game"> into id="game" #3: set an event for you loadQuestion function or put it in side $("document").ready(); event if you want it to load automatically!
12th Jul 2019, 11:08 PM
Thống Nguyễn
Thống Nguyễn - avatar
0
can you send me an example of #3 please?
13th Jul 2019, 2:47 AM
Anthony Cotto
Anthony Cotto - avatar
0
Or add this code: $("document").ready(function(){ loadQuestion(); }); (this will call the function automatically after page load)
13th Jul 2019, 2:53 AM
Thống Nguyễn
Thống Nguyễn - avatar
0
Thank you! the code made the question pop up just not when i clicked the button. it came up up under the the jumbotron.. non the less you helped me get a question visiable an for that i thank you
13th Jul 2019, 2:59 AM
Anthony Cotto
Anthony Cotto - avatar
0
Thank you! I was stuck on this for 2 days!
13th Jul 2019, 3:03 AM
Anthony Cotto
Anthony Cotto - avatar