Hello.
I'm still in the learning process.
I'm trying to figure out how this works. I'm trying to change the background and color of the text on hover and make it click able.
When it is clickable, I would like the background to change on active, and then when you click on something else the previous link will be normal, and the new linked will have the changed background.
So far, I can hover and click links, but when I hover over each link, the previous link hovered won't revert back to the original css. Same with the clicks, the previous click won't go back to normal when on new active link.
So far this is my code that I can figure out.
$(document).ready(function(){
// $('.accMenu li').hover(function(){
// $(this).addClass('acctHover');
// },function(){
// $(this).removeClass('acctHover');
// });
$('.accMenu li').live('click hover',function(){
$(this).addClass('acctHover');
},function() {
$(this).removeClass('acctHover');
});
});
I commented out some of the code because I'm trying to put together hover and click.
Also this is my css
li.acctHover a, li.acctHover a:active {background:#000;}
li.acctHover a, li.acctHover a:active {color:#fff;}
Any help would be great!
Thank you