samedi 15 juin 2019

How to handle a CSS property of clicked object in Ember?

Tell me please, how to handle onclick action by ID. For example, i’ve something in hbs template:

<button id="myButton"  >OK</button>

it has CSS:

button {color: "red";}

How to do two things by onclick action:

1. Set property to clicked object (only to clicked), eg to set CSS colour “green”,
2. Get some property of clicked (eg CSS colour), and console log or alert.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire