How to disable e.preventDefault for some element

HTML
<a href="www.google.bg" class="externalLink">link 1</a> <a href="www.google.bg">link 2</a>
CSS
JAVASCRIPT
$('a').click(function(e){ e.preventDefault(); }); $('.externalLink').click(function(e){ var targetLink = $(this).attr('href'); window.open(targetLink, '_self'); });
Expand for more options Login