title: jquery - scope inside $(document).ready()?
body: <p>So to stay organized, I have several javascript files, even though they all (in the end) are minified together to form one final javascript file.</p>
  
  <p>Each file's contents are wrapped in:</p>
  
  <pre><code>$(document).ready(function(){
      //some javascript here
  });
  </code></pre>
  
  <p>It seems like if I have things in separate files (in between that code) they don't have access to each other. Is this a scope issue? What can I do?</p>
  
  <p>For example, in one file I had a bunch of code to create tables from data received through ajax. However, half of the file was just templates for how to display the data depending on it's types and such. I would like to have the templates in their own file.</p>
  
  <p>I understand this is just a 'preference' issue and that I could just have it all in one file.</p>
  
  <p>But I'm hoping to learn from this and perhaps even be able to have it 'my' way.</p>