I have a link like this:
<a hreflang="15" class="comment-show-link" href="">View/hide comments</a>
And then have this code to show/hide the content:
$('.comment-show-link').click(function(e) {
$('#comment-show-'+$(this).attr("hreflang")).slideToggle('slow');
e.stopPropagation();
});
But when I click the link the page is sended and the div “#comment-show-” isn’t showed, why? What I’m doing wrong?
Try:
–
or to prevent both the default action and bubbling, do