I have :
$('.clic').click(function () {
event.preventDefault();
var cliclink = $(this).attr('href');
var clicanchor = $(this).text();
$.post("addclic.php", { li: cliclink, an: clicanchor });
})
and
<a href="new_page.html" class="clic">my_link</a>
When i click on the link, the $.post
is done but i'am no redirected to new_page.html.
If i suppress event.preventDefault()
, i'am correctly redirected to new_page.html but the $.post
doesn't work.
I'd like the link and the $.post
work simultaneously, but how ?....