Hi there, I'm currently facing a small issue and I could really use some assistance. I have a dropdown menu with two selection options - "green" and "blue", and I need to toggle a class based on the selected option.
If you'd like to take a look, here is the JSFiddle link: http://jsfiddle.net/K94mC/
Below is my code snippet:
$(".btn_blue").click(function() {
$(".element").toggleClass("element_blue", 0);
});
$(".btn_green").click(function() {
$(".element").toggleClass("element_green", 0);
});
I'm having trouble identifying where exactly my mistake lies. Any help would be greatly appreciated!
Thanks, Chris