Understanding data passing using .on()
<p>I was reading</p>

<pre><code>function myHandler(event) {
    alert(event.data.foo);
}

$("p").on("click", { foo: "bar" }, myHandler)
</code></pre>

<p>But I think I can do it by</p>

<pre><code>  function myHandler(a) {
      alert(a);
  }
  $("p").on("click", function() { myHandler('bar') })
</code></pre>

<p>Why would I use event, what is event actually for, I also see many people use '<code>this</code>' and '<code>that</code>' in their code, but I can't understand what is it, why not just select elements by their name like <code>$('#something')</code>, that's what I usually do? Any tips on writing most simplify program codes? There are too many different methods but doing the same thing on coding.</p>
