title: How to call a function in jQuery on window resize?
body: <p>I've this code:</p>
  
  <pre><code>&lt;script&gt;
              $(document).ready(function larg(){
              var larghezza = $(document).width();
              $("p.width").text("The width for the " + larghezza + 
                  " is px.");
              });
  
              $(window).resize(function() {
              larg(); 
              });
              &lt;/script&gt;
  </code></pre>
  
  <p>I would like to call the function "larg" on window resize, but it doesn't work..
  How to do that??</p>
  
  <p>Thanks</p>