I'm trying to get a background in a TD element to change images when I hover the mouse over it...
Has anyone succeeded in getting the damn thing to work? I've been searching for a couple of hours now, and all the samples I find point to approximately the same piece of code, but it never works. I would greatly appreciate it if someone could figure this one out
The code I have right now is this:
<td onmouseover="this.style.background-image: 'url(MenuItem_Selected.jpg)';" onmouseout="this.style.background-image: 'url(MenuItem_Unselected.jpg)';">
No matter what I do, I always end up with a Javascript error on the page, and the image flipping never happens.
Thx!
Has anyone succeeded in getting the damn thing to work? I've been searching for a couple of hours now, and all the samples I find point to approximately the same piece of code, but it never works. I would greatly appreciate it if someone could figure this one out
The code I have right now is this:
<td onmouseover="this.style.background-image: 'url(MenuItem_Selected.jpg)';" onmouseout="this.style.background-image: 'url(MenuItem_Unselected.jpg)';">
No matter what I do, I always end up with a Javascript error on the page, and the image flipping never happens.
Thx!