title: How to block a link if its href contains a hash?
body: <p>if condition working but else condition not working.</p>
  
  <pre><code> (function($){
     $(".single-product a").on("click", function(e){
       var link = $(".single-product a").attr("href");    
       if(link == "#"){
          e.preventDefault();
        }else{
          return true;
        }
     });
  
  }(jQuery));
  </code></pre>