I've been getting into jQuery again and obviously I'm missing something.
I want to add a class to an element depending on if another one is visible.
It's hidden with display: none;
and activated with slideToggle
I have this:
if ($("#about_me").is(':visible')){
$("#about_me_clicker").addClass(".about_highlight");
} else {
}
Now I'm assuming I've gotten it totally wrong, so here's a fiddle for you to see.
How can I add this class to the certain div, if the other one is :visible?
Thanks.
Edit:
To make things clear, I will be only applying the class to the one element.