dimanche 27 août 2017

If/else statement - make "else" same as before state

I have certain -select- option on my future web page where costumers have option to select between 2 values (value white and value black). These options change how some content look. Value white is default option and i don't need to change there anything when user chooses that one. Value black is additonal one and when customer selects it, some visual things change. I do those changes using jquery and statemants if/else (if value is selected do that or else...).

My question now is, is there any easy way to make else statment "delete" all those changes from "if" statement and return everything to default state, without much writing same things over and over again?

I hope you understand. Thanks.

Aucun commentaire:

Enregistrer un commentaire