title: exposing properties from a jQuery plugin attached to multiple elements on a page
body: <p>It has been suggested to me the following structure is preferred/standard to expose public properties from a jQuery plugin.</p>
  
  <pre><code>(function($) {
     $.myPlugin = {
         data: {}
     };
  
      $.fn.myPlugin = function() {
          return this;
      };
  })(jQuery);
  </code></pre>
  
  <p>The above example exposes 'data' through the syntax <code>$.myPlugin.data.</code></p>
  
  <p>If the plugin is attached to multiple HTML elements on a page, then I think $.myPlugin.data becomes invalid as it is the equivalent of a static variable.  </p>
  
  <ol>
  <li>What is another way to write the plugin so .data is related to the instance of a particular plugin?</li>
  <li>How would one reference this property through code external to the plugin?  ie.  how do you read the property?</li>
  </ol>