title: passing arguments to foreach loop
body: <p>I'm trying to pass an argument through an <code>.each</code> function, but can't seem to do so. Yet, before the <code>.each</code> statement, the argument has a value, but I can't get to it from within said statement.</p>
  <h3>code</h3>
  <pre><code>show: function (new_value) {
      console.log( new_value )        // returns proper information
      $('span[data-xyz]').each(function () {
          console.log( new_value )    // returns `undefinded`
  
          var attribute = $(this).attr(&quot;data-xyz&quot;);
          if(typeof new_value === &quot;undefined&quot;)
              var new_value = system.defaults.xyz;
  
          console.log( new_value )    // returns `system.defaults.xyz`
  
          $(this).text(attribute[new_value]);
      }
  }
  </code></pre>
  <p>How can I get <code>new_value</code> to be received in my <code>.each</code> statement ?</p>