title: Pushing object parameters through jQuery .each()
body: <p>Anyone has experience with niceScroll... I'm trying to optimize the code that assigns scrollers to their respective elements and attaches their properties. This works only on the first object present in the array ($ele1):</p>
  
  <pre><code>var obj = {
    cursorwidth: 6,
    railoffset: {top:0,left:20}
  };
  
  var eleArray = [$ele1, $ele2];
  
  $(eleArray).each(function() {
  
     $(this).niceScroll( obj );
  
  });
  </code></pre>
  
  <p>but this is ok for all objects in array:</p>
  
  <pre><code>var eleArray = [$ele1, $ele2];
  
  $(eleArray).each(function() {
  
    $(this).niceScroll( {
       cursorwidth: 6,
       railoffset: {top:0,left:20}
    } );
  
  });
  </code></pre>
  
  <p>Any way to have those properties streamlined from an external var where all objects from the array would be processed?</p>