title: How to set a private variable for a jQuery plugin?
body: <p>I would like to create a simple plugin, which works with the text of the element as a default value, or you can set this value, when you call the plugin.</p>
  
  <p>But if I don't set the value, and call the plugin for more than one element, the default value getting multiplied.</p>
  
  <pre><code>(function($) {
      $.fn.reText = function(options) {
          var settings = $.extend({
              label : $(this).text()
          }, options);
          return this.each(function() {
              $(this).text(settings.label);
          });
      };
  })(jQuery);
  </code></pre>
  
  <p>call:</p>
  
  <pre><code>$(function() {
      $('div').reText();
  });
  </code></pre>
  
  <p>the result:</p>
  
  <pre><code>&lt;div&gt;text 1&lt;/div&gt;
  &lt;div&gt;text 2&lt;/div&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/Kreestian/L3tp9/" rel="nofollow">jsFiddle</a></p>
  
  <p>I know, the problem is the <code>settings</code>'s scope, but I don't know how to resolve the problem...</p>