title: While resize browser window counter variable value should be incremented by 1 value
body: <p>I am facing a problem whenever I resize the browser window by (CTRL+SHFT+M) or change the orientation of window. <code>counter_</code> variable value increament by 4 or 7 instead of 1. </p>
  
  <p>HTML:     </p>
  
  <pre><code>&lt;div id="my_element"&gt;
      &lt;span id="text"&gt;0&lt;/span&gt; window resize.
  &lt;/div&gt;
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>$(function () {
      var counter_ = 0;
      $(window).on('resize', function () {
          $('#text').text(++counter_);
      });
  });
  </code></pre>
  
  <p>Output Should be:</p>
  
  <blockquote>
    <p>0 window resize.     </p>
    
    <p>1 window resize.  </p>
    
    <p>2 window resize.  </p>
    
    <p>.. </p>
    
    <p>..</p>
  </blockquote>