Why doesn't this work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
7th Dec 2018, 1:15 AM
Jeremy Cruz
Jeremy Cruz - avatar
7 Answers
0
it does work, nice try.
7th Dec 2018, 1:25 AM
James
James - avatar
0
Its not working for me
7th Dec 2018, 1:26 AM
Jeremy Cruz
Jeremy Cruz - avatar
0
you need to attach the function "myFunc" to DOMWindow Object to make it global: document.addEventListener("DOMContentLoaded", function() { window.myfunc = () => { document.getElementById("c").innerText = "text" }; })
7th Dec 2018, 1:44 AM
MO ELomari
0
ohh total different objective i was going for, sorry about that.
7th Dec 2018, 1:55 AM
James
James - avatar
7th Dec 2018, 2:02 AM
MO ELomari
0
How can i make it go back and forth
7th Dec 2018, 2:03 AM
Jeremy Cruz
Jeremy Cruz - avatar
0
is that what you're intented: https://code.sololearn.com/WDWN0xJAm7J0/#html
7th Dec 2018, 2:19 AM
MO ELomari