simplest way to change colour on a class?
Hi folks,
I have this script which, on mouseover, shows a nested element of a class.
I want to add a snippet which, on click, changes the color of the class... maybe with a fast fade.
Does it require creating a second class with the new color? Something like:
$(document).ready(function(){
$('.class').hover(function(){
$(this).find('.bit').show();
}); //existing script
$('.class').click(function(){
$('.class').addClass('.class2');
// not sure how to combine fade with change of class
});
});
Cheers