title: importance of function wrappers in javascript
body: <p>Can someone explain to me the importance of using function wrappers (ie: when assigning onclick functionality)? I know I should, but I don't fully understand why...</p>
  
  <p>Example:
  It's my understanding that this:</p>
  
  <pre><code>$(callingImg)[0].setAttribute("onclick", "function(){removeChildren(this);}");
  </code></pre>
  
  <p>is better than this:</p>
  
  <pre><code>$(callingImg)[0].setAttribute("onclick", "removeChildren(this)");
  </code></pre>