Let me define the problem a little bit more:
i have
<div class=contact>
<div id=form></div>
<div id=icon></div>
</div>
i want onclick on #icon
, to change the class of .contact
to .contactexpand
( or just append it).
Then i want that the on body click to change the class back, but of course that shouldnt happen when clicking on the new class .contactexpand
, and if possible that clicking on icon again changes the class back again.
I tried numerous examples and combinations but just couldn't get the right result and behavior.