0
The js file
How can I put the js file in the body element wherever I want, for example after the div before dive or in the div in sololearn app? I know I can access the div by referring the the tag or I can even create another script in the body, but I want to move the external js that is provided to move it anywhere I want.
6 odpowiedzi
+ 3
+ 1
You can write JS in the html tab.
The JS tab is automatically linked to the html tab
0
Lisa I know how to add script tag I'm talking about how can I move the js that is provided in sololearn to move it anywhere I want in the body tag in sololearn app?
0
Lisa yes I have tried that and it worked but I was looking for a way I can alter the linked JS to work where I want in the body without creating another <script> tag. But I think is not possible in the app right?
0
No, we don't have influence on when/where the JS tab is linked.
If your code requires that the body is completely loaded, you can wrap your code in
window.onload = () => {
// your code
}
0
Yes correct thanks Lisa.