Your class is binded to the active parameter from your controller, which you toggle when clicking.
Therefore, that class will be added and removed when the action is executed.
Hi Dmathieu,
Thanks for your input. Firstly, the bind-attr will go to WRAP div which is in a separate handelbar template (please see the code above) and the button with action is in another handlebar template. Secondly you not mentioned where shall I place the code for action? In controller like this;
but anyway I tried to run the code after placing the action code into Controller I get this error:
Uncaught Error: Nothing handled the event ‘changeClass’.
Can you give any idea what is going on? Does it mean I need to define a model for this action?