[jQuery] data is posted only once
Hi There
I got some elements here.
<a href="#" id="p_12" class="pager"></a>
<a href="#" id="p_13" class="pager"></a>
jquery:
$(function() {
$('a.pager').click(function() {
var currentpage = $(this).attr('id');
$.ajax({
url: 'php/pager.php',
type: 'POST',
data: 'currentpage=' + currentpage,
success: function(result) {
$('div.response').remove();
$('div#pContent').append('<div class="response">' + result + '</
p>');
$('div#loading').fadeOut(500, function() {
$(this).remove();
var currentpage = null;
});
}
});
return false;
});
});
At the first click it's posting the date fine but if I click once more
then its doing nothing.
I dont know why isnt it sending the data again.
Can somebody help me what did I screw up?
thanks in advance
appreciated