How to hover
every different background-color
?
These code set the background-color is working:
var dlcabgColors = [
'rgb(233, 147, 26)', 'rgb(22, 145, 190)', 'rgb(22, 107, 162)' , 'rgb(27, 54, 71)'
];
var i = 0;
$('.abc').each(function() {
$(this).css('background-color', dlcabgColors[i]);
i = (i + 1) % dlcabgColors.length;
});
But when I add hover function,the function will repeat all background-color.
I want to specify the elements of a specified color, not repeat all background color
As always, your assistance is appreciated!
Thanks!every one:)