title: Accessing clicked element and "this" class reference in the same scope
body: <p>I have this piece of code written in coffeescript (sorry..)</p>
  
  <pre><code>_this = this
  $('body').on 'click', '.open-modal', =&gt;
      _this.modalId = $(this).attr('data-modal-id')
      _this.modalEl = $( '#' + _this.modalId )
      _this.modalAction = $(this).attr('data-action')
  
      _this.openModal()
  </code></pre>
  
  <p>is there a way how to access clicked element <code>('.open-modal')</code> and in the same time preserving <code>this</code> keyword for the Class not the clicked element.</p>
  
  <p>basically I would want to achieve something like this</p>
  
  <pre><code>$('body').on 'click', '.open-modal', (el) =&gt;
      this.modalId = $(el).attr('data-modal-id')
      this.modalEl = $( '#' + this.modalId )
      this.modalAction = $(el).attr('data-action')
  
      this.openModal()
  </code></pre>
  
  <p>is there a way how to do it?</p>