title: window.resize event only fires once
body: <p>I am trying to execute things on <code>window.resize</code>, but I can't even get alert to work more than once. All of the code I have is this:</p>
  <p>HTML:</p>
  <pre><code>&lt;head&gt;
      &lt;meta charset=&quot;utf-8&quot;&gt;
      &lt;script src=&quot;jquery-1.11.1.min.js&quot;&gt;&lt;/script&gt;//I have this library in this html's file directory
      &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
  
    &lt;script type=&quot;text/javascript&quot;&gt;
      $(document).ready(function(){
        window.resize(alert(&quot;yolo&quot;));
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  ...
  &lt;/body&gt;
  </code></pre>
  <p>I have also tried several variations:</p>
  <pre><code>window.resize(...)
  
  window.on(&quot;resize&quot;,...)
  
  window.one(&quot;resize&quot;,...)
  
  $(window).resize(...)
  
  $(window).on(&quot;resize&quot;,...)
  
  $(window).one(&quot;resize&quot;,...)
  </code></pre>
  <p>None of them work. Is there anything else I haven't tried?</p>