title: jQuery function on window resize
body: <p>I have this little function in <code>head</code>:</p>
  
  <pre><code>&lt;script&gt;
      fontsize = function() {
          var fontSize = $(".container").width() * 0.10;
          $(".container #link").css('font-size', fontSize);
      };
      $(document).ready(fontsize);
  &lt;/script&gt;
  </code></pre>
  
  <p>It's working. On document ready. But I want, also, on window resize.</p>
  
  <p>I've tried with <code>$(window).resize(fontsize);</code>, nothing happens.</p>