title: Does caching jQuery objects in an array improve speed?
body: <p>Today I was making an effect for share-icons using jQuery. The effect is a bit complicated so I tried to think of a way to optimize preformance. I ended up caching the <code>$(this)</code> object into array.</p>
  
  <h2>Effect Demo</h2>
  
  <p>I uploaded a working example of the effect using the array-cached objects (Hover on the icons to see the effect):
  <a href="http://mahersalam.co.cc/addthis/" rel="nofollow">http://mahersalam.co.cc/addthis/</a></p>
  
  <h2>HTML:</h2>
  
  <pre><code>&lt;div id="share-widget" class="addthis_toolbox"&gt;
      &lt;a class="addthis_button_favorites" title="أضف للمفضلة"&gt;&lt;div&gt;أضف للمفضلة&lt;/div&gt;&lt;/a&gt;
      &lt;a class="addthis_button_facebook" title="شارك في فيسبوك"&gt;&lt;div&gt;شارك في فيسبوك&lt;/div&gt;&lt;/a&gt;
      &lt;a class="addthis_button_twitter" title="شارك في تويتر"&gt;&lt;div&gt;شارك في تويتر&lt;/div&gt;&lt;/a&gt;
      &lt;a class="addthis_button_email" title="أرسل الصفحة بالإيميل"&gt;&lt;div&gt;أرسل الصفحة بالإيميل&lt;/div&gt;&lt;/a&gt;
      &lt;a class="addthis_button_compact" title="أضغط هنا لمشاهدة المزيد من خدمات المشاركة"&gt;&lt;div&gt;المزيد من الخدمات&lt;/div&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h2>Javascript:</h2>
  
  <pre><code>// Return jQuery-obj of the share links
  var shareLinks = $('#share-widget').find('a').css('opacity', 0.8);
  
  //////////////////////////////////////////
  // Only jQuery way
  //////////////////////////////////////////
  
  shareLinks.hover( 
      function () {
          $(this).clearQueue()
              .siblings()
                  .stop(true,false).fadeTo('fast', 0.3)
              .end()
                  .stop(true, true).fadeTo('normal', 1);
      },
      function () {
          shareLinks.delay(100).fadeTo('normal', 0.8);
  })
  
  
  //////////////////////////////////////////
  // jQuery + Array cache way
  ////////////////////////////////////////// 
  
  // Cache the array
  var linksArr = [];
  
  $.each( shareLinks, function (i) {
  
      linksArr.push( $(this) );
  
      linksArr[i].hover( function () {
          linksArr[i].clearQueue()
                      .siblings()
                          .stop(true,false).fadeTo('fast', 0.3)
                      .end()
                          .stop(true, true).fadeTo('normal', 1);
       },
      function () {
          shareLinks.delay(100).fadeTo('normal', 0.8);
      })
  });
  </code></pre>
  
  <p>I just want to know if the array cached objects will make the performance faster or is it just not necessary. Also if anyone have a better idea to make this effect, I'm all ears ^^.</p>