I have a click listener on a div and inside the div I have a link with a normal -tag but whenever I click on the link the event is also run. How can I prevent the stuff within the click-listener to run if the click on the link inside the div?
HTML:
<div class="container item-container" data="skarp-version-av-os-x-10.8.3-slappt">
<div class="item">
<div class="number">
<p class="number-data">1</p>
</div>
<div class="upvotes btn tooltip-points" points="4" id="90" data-toggle="tooltip" title="" data-original-title="Visar poäng satta de senaste 24 h">
4 poäng
</div>
<div class="item-content">
<a href="http://feeds.idg.se/~r/idg/ETkj/~3/XSuYKgEiumE/skarp-version-av-os-x-1083-slappt" target="_blank" class="item-link fill-div">Skarp version av OS X 10.8.3 släppt</a>
<span class="item-source">(feeds.idg.se)</span>
<p class="item-author">Upplagd av Anonym - <em>2013-03-17 21:07:08</em></p>
</div>
<div class="comment">
<i class="icon-comment"></i> <a href="http://www.tldr.nu/item/view/skarp-version-av-os-x-10.8.3-slappt#disqus_thread">0 Comments and 0 Reactions</a>
</div>
</div>
</div>
Javascript:
$('.item-container').click(function(event) {
var url = $(this).attr('data') ? $(this).attr('data') : '';
if(url != '')
window.location = getBaseURL() + 'item/view/' + url;
});