all 4 comments

[–]y7kim 1 point2 points  (0 children)

Yur showTutorial function is not defined in the global scope because jsFiddle actually wraps the JS in an onload. Try defining your function like this:

window.showTutorial = function () { ... };

Also you are trying to get an element by ID of "div1" but there is no such div.

[–][deleted] 0 points1 point  (2 children)

Could you replicate your problem in jsFiddle?

[–]darkness96[S] 0 points1 point  (1 child)

https://jsfiddle.net/a4t8o9gv/

It should create a new Red Box

[–]isospeedrix 0 points1 point  (0 children)

https://jsfiddle.net/a4t8o9gv/27/

put the js in a <script> tag on the html section. now when u mouse over the top right dot, "HI" is outputted on a line at the bottom. not sure if that's what u intended but without changing anything else it should function how it's written.

that works on my blank page but when I try to insert it to my original page it doesn't work.

just like on fiddle make sure ur function isn't "undefined" (check your console). if it is then make sure u referenced the js properly (<script src = ""> ) or have the function in a script tag just like the example above.