title: Access $('selector').data in functions/objects
body: <p>How do I access values set by $.data() inside a function or object</p>
  
  <pre><code>       $('#timers').data('firsttimer', 100);
  
  
      //prints 100
      document.write($('#timers').data('firsttimer'));
  
      function blah(){
          //Prints nothing
          document.write($('#timers').data('firsttimer'));
      }
  
  blah();
  </code></pre>
  
  <p>See this jsfiddle for easy access to test the code <a href="http://jsfiddle.net/JUfd8/" rel="nofollow noreferrer">http://jsfiddle.net/JUfd8/</a></p>