Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

How to handle a CSS property of clicked object?

$
0
0

@Nar_Zantaria wrote:

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

<button id="myButton" {{action "myAction"}} >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!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles