title: object consisting of jQuery element
body: <h3>current code</h3>
  <p>I've built function to do something over collection of jQuery elements:</p>
  <pre><code>var collection = $([]); //empty collection
  </code></pre>
  <p>I add them with:</p>
  <pre><code>collection = collection.add(e);
  </code></pre>
  <p>and remove with:</p>
  <pre><code>collection = collection.not(e);
  </code></pre>
  <p>It's pretty straightforward solution, works nicely.</p>
  <h3>problem</h3>
  <p>Now, I would like to have an object consisting of various settings set to any jQuery element, i.e.:</p>
  <pre><code>function addObject(e){
    var o = {
      alpha: .6 //float
      base: {r: 255, g: 255, b: 255} //color object
    }
  
    e.data('settings', o);
  }
  </code></pre>
  <p>But when I pass jQuery object/element to function (i.e. as <code>e</code>), calling <code>e.data</code> doesn't work, although it would be simplest and really nice solution.</p>
  <h3>question</h3>
  <p>If I have an &quot;collection&quot; of jQuery elements, what is the simplest way of storing some data for each element of set?</p>