title: How to use e.preventDefault() on $(this) inside the $(window).resize()?
body: <p>how can I use <code>$(this).e.preventDefault()</code> ? </p>
  
  <p>What I want / need is on window resize the <code>&lt;a&gt;</code> should behave differently. So like in the fiddle example if window Width is smaller than 710 the <code>href</code> should not be triggered. There will only be some JavaScript function toggling the <code>subnav</code>. But if window is wider than 710px, I want the <code>href</code> to work "normally". </p>
  
  <p>Now with setting up the example I've seen the event is firing multiple times. How can I do it that if fires only once? </p>
  
  <p>Also, is there a better way to achieve what I want?</p>
  
  <p>Please resize window in jsfiddle before clicking! <a href="http://jsfiddle.net/2E8eH/" rel="nofollow">fiddle here</a></p>
  
  <pre><code>$( window ).resize(function() {
      var wW = $(window).width();
      $('.windowWidth span').html(wW);
      if(wW &lt; 710) {
          $('nav ul.nav &gt; li &gt; a').on('click',function(e){
              e.preventDefault();
              alert("here");
          });
      } else {
          $('nav ul.nav &gt; li &gt; a').on('click',function(e){
              alert("there");
          });
      }
  });
  </code></pre>