title: Self-invoking function jQuery
body: <p>I noticed that in some places, jQuery code is wrapped in a self-invoking function like below. Why is this done, in what cases is this useful and in what cases is an unnecessary boilerplate?</p>
  
  <pre><code>function( $ ) {
    ...
  }( jQuery );
  </code></pre>