here is my code:
<a href='P001' class='basic'>Read More</a><br>
<a href='P002' class='basic'>Read More</a><br>
<a href='P003' class='basic'>Read More</a><br>
my script:
$('.basic').click(function(id){
$.ajax({
url: 'display_pro.php?id='+$('.basic').attr('href'),
success: function(data) {alert(data);}
});
});
when i click all links it’s always get the ‘P001’.
what is the problem?
Thanks for your help.
1 Answer