$(this) and event.target different but should be the same
<p>I have the following code that wires up the click event function to the submit button. I am aware that <code>event.target</code> and <code>this</code> are not always the same (as I understand it depends where the event was attached to and who actually fired it) but in this case the event was attached to the button and the button also fired it, so they should be the same. Or am I wrong?</p>

<pre><code> modals.init = function () {
    // wire up submit() function to the submit button
    modals.config.$submitBtn.on('click', submit);
  };

  function submit(event) {
    event.preventDefault();
    var $this = $(this);
    alert(event.target.id); // fine
    alert($this.id); // undefined
}
</code></pre>
