JavaScript How to change color of font-awesome icon by clicking the icon change color font awesome,change color font html,change color

You are missing the ); after the closing }:

var garbage = document.getElementById("garbage");

garbage.addEventListener("click",function(){
  garbage.style.color = "#66c144";
});
<link target='_blank' href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" rel="stylesheet">

<div id="garbage">
  <i class="fas fa-trash"></i>
</div>
Answer:1

I have a main.js with React.render( <h1>Hello, world!</h1>, document.getElementById('myDiv') ); I am using CodeKit, and it spits out the error: Unexpected token: ...

I have a main.js with React.render( <h1>Hello, world!</h1>, document.getElementById('myDiv') ); I am using CodeKit, and it spits out the error: Unexpected token: ...

  1. react unexpected token expected
  2. react unexpected token ' '
  3. react unexpected token in json at position 0
  4. react unexpected token import
  5. react unexpected token export
  6. react unexpected token return
  7. react unexpected token if
  8. react unexpected token fragment
  9. react unexpected token svg
  10. react unexpected token arrow function
  11. react unexpected token function
  12. react unexpected token const
  13. react unexpected token state u003d

So, I'm picking up JavaScript since I just seems to enjoy it. I bought an online course, and now facing a challenge in my code. It's a pretty simple one, so hopefully one of the experts out there can ...

So, I'm picking up JavaScript since I just seems to enjoy it. I bought an online course, and now facing a challenge in my code. It's a pretty simple one, so hopefully one of the experts out there can ...

  1. javascript sort different results
  2. javascript regex different results

Hi I want to use a similar functionality like : Using Inline Templates in Angular But in my case url will be dynamic. for example in below code url will have /first or /second but in my case it will ...

Hi I want to use a similar functionality like : Using Inline Templates in Angular But in my case url will be dynamic. for example in below code url will have /first or /second but in my case it will ...

  1. inline template angular 8
  2. inline template angular
  3. inline template angular 6
  4. inline template angular 4
  5. inline template angular 2
  6. inline template angular 7
  7. inline template angular component
  8. inline template angular 2 example
  9. inline style angular template
  10. angular inline template example
  11. angular inline template vscode
  12. angular inline template variable
  13. inline javascript in angular template
  14. angular inline template directive
  15. angular inline template command

I created a simple login page, which, once the button is pressed, executes this function : login = (email, password, navigate) => { this.setState({ loginButtonPressed: true }); firebase ....

I created a simple login page, which, once the button is pressed, executes this function : login = (email, password, navigate) => { this.setState({ loginButtonPressed: true }); firebase ....

  1. undefined the function