HTML/JavaScript onmouseover misses spots?

Cristian M

New member
Can you please check this out? If you put the mouse from the right of the image or at the title it doesn't work... First image: all the right half is not working, second image: only the top right part. Why?
Sorry for being so much code, there was more :D but I've made it shorter.
Code:
http://pastebin.com/9whu8buV
Thank you
setTimeOuts are because Chrome browser (at least) takes some time to fix its width and height, so the image would be smaller if I wouldn't have put it.
Oops, old version
http://pastebin.com/nQjgA19v
Sorry :D

doh.... now I see it. I knew about the developer tools, the canvas was put after so I can test some functions... Thank you both for your answers!
 
In Chrome, look under the Tools menu, and open Developer Tools.

Position the tools window so you can see as much of your web page as possible.

Click the elements button in top left.

Now hover your mouse over each element in the HTML in left tab. That will let you see where each element is.

When you get to the canvas element, you will see where your problem is.
 
The code looks OK -- it might have something to do with z-index -- try setting that on either the element or the element's containing div, just to bring it to the front. Also try it in a few different browsers: if it works perfectly in one of them, it's probably a browser thing.
 
Back
Top