title: jquery anonymous function declaration meanings
body: <p>Are the following assumptions accurate?</p>
  
  <p>1) execute immediately</p>
  
  <pre><code>(function(){
  })();
  </code></pre>
  
  <p>2) execute on document ready</p>
  
  <pre><code>$(document).ready(function(){
  });
  </code></pre>
  
  <p>3) shorthand for on document ready</p>
  
  <pre><code>$(function(){
  });
  </code></pre>
  
  <p>4) alternative shorthand for on document ready for avoiding cross script conflicts</p>
  
  <pre><code>(function($) {
  })(jQuery);
  </code></pre>