title: jQuery/Javascript: Defining a global variable within a function?
body: <p>I have this code:</p>
  
  <pre><code>        var one;
          $("#ma1").click(function() {
              var one = 1;
          })
          $("body").click(function() {
              $('#status').html("This is 'one': "+one);
          })
  </code></pre>
  
  <p>and when I click the body, it says: This is 'one': undefined. How can I define a global variable to be used in another function?</p>