title: Making a picture clickable in Vuejs
body: <p>I have a picture that I want to be clickable. I tried both </p>
  
  <pre><code>&lt;img @click="myMethod" src="hasan.jpg"&gt; 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;div @click="myMethod"&gt;
     &lt;img src="hasan.jpg"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>but neither worked! What's the best way to do it?</p>
  
  <p>Here is the complete code:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div @click="myMethod"&gt;
     &lt;img src="hasan.jpg" id="hasanStyle"&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  export default{
    data(){
      return{
        showHasan:true
      }
    },
    methods:{
      myMethod(){
        showHasan = false
      }
    }
  }
  &lt;/script&gt;
  
  &lt;style scoped&gt;
    #hasanStyle{
      position: absolute;
      top: 120px;
      right: -323px;
    }
  &lt;/style&gt;
  </code></pre>