• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

changing LI element image on hover in javascript


Hi,
Experts I have attached a zip file of my small project in javascript. There in  LI HTML Element Menu.
onmouseover event of the element i have written a script that will display an image in the background of the LI item. But its not working i have tried several ways.

Please help in this as my entire project menu will work on this.
default.zip
0
vikas_nm
Asked:
vikas_nm
  • 3
  • 2
1 Solution
 
effxCommented:
1. iframe is missing

2. line 17 on nav.css is missing a "." it should be ".li-submenu-item-hovered"

3. why dont you use jQuery?

0
 
effxCommented:
I placed this in the body:
<iframe id="contentframe"></iframe>

Open in new window

0
 
vikas_nmAuthor Commented:
can u give a working example of jquery: for mouseover, mouseclick and mouseout
0
 
effxCommented:
As requested:
$(".submenu-area li").hover(function(){
	$(this).addClass("li-submenu-item-hovered");
}, function(){
	$(this).removeClass("li-submenu-item-hovered");
});

Open in new window

0
 
vikas_nmAuthor Commented:
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now