title: What "jQuery(function($) {" is for?
body: <p>I'm pretty new to web programming.  </p>
  
  <p>Looking for a jQuery function I found something like:</p>
  
  <pre><code>jQuery(function($) {
      $('#EleId1').click(function () {
          //do stuff
      }
      $('#EleId2').click(function () {
          //do other stuff
      }
  
  }); 
  </code></pre>
  
  <p><strong>BUT</strong> if I remove "<code>jQuery(function($) {</code>" and the final "<code>});</code>" all is still working and I have no errors in the console.  </p>
  
  <p>So my question about "<code>jQuery(function($) {</code>" is:<br>
  Is it recommended (as best practice or for a more readable code) or is it needed for other reasons?  </p>
  
  <p><strong>EDIT</strong> 
  In the similar question "jQuery" is missing so it doesn't seems an identical question to the ones not knowing that "$" is equivalent of "jQuery" as explained in the below comment.</p>