title: Can I save overhead by not calling jQuery every time I need to access an element?
body: <p>Let's say I have this block of code:</p>
  
  <pre><code>$('#myBox').css('background', 'grey');
  $('#myBox').click( function(e){ console.log( 'Box clicked' ); });
  $('#myBox').html(' Just a test text ');
  </code></pre>
  
  <p>What I know so far is that I'm searching an element with the <code>myBox</code> ID at every line.
  The question: would I benefit from a variable creation when I have multiple references to an HTML element?</p>
  
  <p>Or will the variable still search for the associated element every time I access it?
  Example:</p>
  
  <pre><code>var $myBox = $('#myBox');
  
  $myBox.css('background', 'grey');
  $myBox.click( function(e){ console.log( 'Box clicked' ); });
  $myBox.html(' Just a test text ');
  </code></pre>