title: jquery - use a variable outside the function
body: <p>How I Can use a variable outside the function where it was declared?</p>
  
  <pre><code>$(function() {
      function init() {
          var bwr_w = $(window).width();
      }
      init();
      $('#button').click(function() {
          alert('The Browser Height is' + bwr_w);
      });
  });
  </code></pre>
  
  <p>If I click on the button I get this error:</p>
  
  <p><strong>bwr_w is not defined</strong></p>