SOLVED: Javascript "onmouseover" does not work
This is a follow up on a problem that was encountered yesterday. The original post can be found here:
https://community.adobe.com/t5/Dreamweaver/Javascript-onmouseover-does-not-work/td-p/10681988
In a few words the problem was that a code I had written in Javascript for my website did not work in Dreamweaver HTML code, whereas it worked in jsfiddle and in theory also in W3schools site.
The problem was solved when I moved the Javascript code to the bottom of the HTML code, right before the </body> tag. Previously I had linked it through <script src"..."></script> at the head and it didn't work. As soon as I moved it as the last line inside the <body> it functioned as it should.
I am new in coding and I haven't quite worked with scripts at both the <head> and at the <body> as it is mentioned here https://www.w3schools.com/js/js_whereto.asp , and why one works and the other doesn't, but general consensus as far as I a have read is for the script to be put at the bottom of the page.
If anyone has any insight on the matter, please share it so that people like me with zero experience in coding can benefit.
Cheers,
Daniel
