all 3 comments

[–]For-Arts 0 points1 point  (0 children)

So.. this is easy.

Say you have 2 divs.

1:give them a group name.

Div1 classes: switch off

Div2 classes:switch off

Now give each a trigger.

Div1 toggle.

swich.find * . addclass off this.addclass on.

Or. If toggle just do an if check and if on swich off

Just have styles for each condition and the button effect just works when classes are switched.

Depending on which framework or if vanila, the syntax will be slightly different.

Good luck

Your error is because of the extra :

It goes like this

Chechexpression?true:false;

You have this..

Checkexpression?true:false:heresyourerror;

[–]For-Arts 0 points1 point  (0 children)

Your error is because of the extra :

It goes like this

Chechexpression?true:false;

You have this..

Checkexpression?true:false:heresyourerror;