title: jQuery event.prevent only at #
body: <p>I've got this function:</p>
  
  <pre><code> $(document).ready(function(){  
      $("nav a").click(function(evn){     
          evn.preventDefault();
          $('html,body').scrollTo(this.hash, this.hash);
      });
   });
  </code></pre>
  
  <p>My navigation got some links and some "#"ankers.
  When I add the function, all the links don't work, how can I change the function, so that the function only works when the href="" got an "#" in it?</p>
  
  <p>I hope you can help me.</p>
  
  <p>Edit: is an an example: <a href="https://jsfiddle.net/cq4krz0w/" rel="nofollow">https://jsfiddle.net/cq4krz0w/</a></p>