embedding Javascript in a Wiki page #6472
-
|
Hello all, I have some JS code (image gallery browser sort of thing in JQuery). The reference ot JQuery I put in the header in the theme code, the rest - in the box for the bottom of the body section. The errors do pop up in the console, the code itself would not start. I.e., the JQ .ready function would not start. Any thoughts? Thanks. Boris. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
I have solved it. The code was running but I used the .ready function and the did not work. The "on load" event was the way to go. Source: https://www.sitepoint.com/jquery-document-ready-plain-javascript/ |
Beta Was this translation helpful? Give feedback.
That's not the proper way to do it and will likely fail for some users.
https://docs.requarks.io/en/troubleshooting#how-to-execute-javascript-code-on-page-load