Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

menu to change colors dynamically

I have a menu on my page which has a set of sub-menu that will be displayed on h-over.

i planned to make the menu to change color dynamically each time i hover.

I like to add a set of colors.

For example

#cccccc;

#999999;

#474747;

#4c4c4c;

These colors must be dynamically changed when i hover I tried to some jquery like this:

$('menu').css('backgroundImage', 'url(something.gif)');

but my plan is to make it only with css. Any idea for this?

like image 301
Karthikeyan.A Avatar asked Dec 06 '22 11:12

Karthikeyan.A


2 Answers

$('menu').css('backgroundImage', 'url(something.gif)');

inspite of using image try to use

$('menu').css('background', '#cccccc');


$('menu:hover").css('background', '#999999', '#474747', '#4c4c4c');
like image 95
Vivek Dragon Avatar answered Jan 07 '23 00:01

Vivek Dragon


You could use this

$('navigation').css('background',' #cccccc');

$('navigation:hover").css('background','#999999','#474747',#4c4c4c

like image 43
SandhanaMurali Avatar answered Jan 07 '23 01:01

SandhanaMurali