Check out this code snippet: http://jsfiddle.net/celiostat/NCPv9/
Utilizing the 2 jQuery plugin allows for the following changes to be made: - The background color of the div can be set to gray. - The text color can be changed to red.
The issue arises when trying to change the color of the text by precisely pointing the mouse on it. I am looking to change both the background color of the div and the text color by simply clicking anywhere within the div.
I have attempted different combinations from various posts, but none have been successful.
(In an ideal scenario, I would also like to change the picture simultaneously!)
$(".item_unselected").on("click", function() {
$(this).toggleClass("gray_cliked_box");
$(".item_unselected").not(this).removeClass("gray_cliked_box");
});
$(".item_text_in_menubar").on("click", function() {
$(this).toggleClass("blue_cliked_text");
$(".item_text_in_menubar").not(this).removeClass("blue_cliked_text");
});