title: jQuery extend $.fn and calling method syntax
body: <p>I understand that you call a method like this when you are extending <code>$.fn</code>.</p>
  
  <p>( <code>$ == jQuery</code> )</p>
  
  <pre><code>//$("div").myMethod();
  
  $.fn.extend({
     myMethod: function(){...}
  });
  </code></pre>
  
  <p>And like this when you extend the jQuery Object:</p>
  
  <pre><code>//$.myMethod2();
  
  $.extend({
      myMethod2: function(){...}
  });
  </code></pre>
  
  <p>But I don't quite understand what the <code>$()</code> is doing here:</p>
  
  <p>// There are a few methods being called here. Some with the same method name (initiate) which is bad.</p>
  
  <p>// But maybe that is why the blank jQuery object is needed so the method names don't clash</p>
  
  <pre><code>$(function() {
  
      $().functionName({
        something: 'something'
      }).myMethod();
  
      $().func1({
        x: 1
      }).initiate();
  
      $().func2({
        y: 2
      }).initiate();
  
  });
  </code></pre>
  
  <p>Does it have to do with the fact the method is being called including the function name?</p>
  
  <p>Thanks in advance and hope this makes sense.</p>