title: Vue.js - change color for all elements except the element clicked
body: <p>I am trying to switch from jQuery to Vue.js and I am a little bit stuck with this. I have 3 buttons on the page. When I click on a button, I want all the other buttons to change the background color to green and the button that was clicked - change it's color to black.</p>
  
  <p>It was just 2 lines of code with jQuery but I can't figure out how to accomplish it with Vue.js. There also doesn't seem to be a this keyword for Vue.js.</p>
  
  <p>Also, at this point, I'd like to just apply raw css background-color property instead of applying a class.</p>
  
  <p>Here is my jQuery code - very simple</p>
  
  <pre><code>&lt;div class="main-content-area"&gt;    
    &lt;div class="btn"&gt;Click me!&lt;/div&gt;
    &lt;div class="btn"&gt;Click me!&lt;/div&gt;
    &lt;div class="btn"&gt;Click me!&lt;/div&gt;    
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>const Example = new Vue({
    el: '.main-content-area',
    methods: {
      addEventListeners() {
        $(document).ready(function() {
          $(".btn").click(function() {
            $(".btn").css("background-color", "green"); // Make all buttons green
            $(this).css("background-color", "black"); // Make the clicked button black
          });
        });
      }
    },
    mounted: function() {
      this.addEventListeners();
    }
  })
  </code></pre>
  
  <p>With Vue.js - I got only this far...</p>
  
  <pre><code>&lt;div class="main-content-area"&gt;    
    &lt;div class="btn" @click="changeColor"&gt;Click me!&lt;/div&gt;
    &lt;div class="btn" @click="changeColor"&gt;Click me!&lt;/div&gt;
    &lt;div class="btn" @click="changeColor"&gt;Click me!&lt;/div&gt;    
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>const Example = new Vue({
    el: '.main-content-area',
    methods: {
      changeColor() {
        //  Change color to green for all .btn elements
        //  and change  color for clicked .btn to black
      }
    })
  </code></pre>