title: Accessing a variable outside of jquery.ready()
body: <p>This is becoming very frustrating so I'm hoping someone is able to help. I am not a great JavaScript or JQuery developer (more of back-end guy) but I've searched high and low for a solution to this and nothing seems to help. This is a simplified version of my problem...</p>
  
  <pre><code>&lt;script language="JavaScript" type="text/javascript"&gt;
  fooey = 'baaa';
  
  jQuery(document).ready(function($) {
  
  fooey = 'New value';     
  
  });
  
  alert("value: " + fooey);  // I need this to be 'New value'
  
  &lt;/script&gt;
  </code></pre>
  
  <p>How can I change the fooey variable inside the JQuery block then access this new value from outside of the JQuery block. So I'm expecting the alert popup to show 'New value' not 'baaa'. </p>