Bonsoir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| $(document).ready(function(){
$(".paginate").click(function() {
var page = $(this).attr("href");
page = page.replace("index.php","produits.php");
$.ajax({
url: page,
cache: false,
success: function(html){
$("#produits").html(html);
},
error: function(XMLHttpRequest, textStatus, errorThrown){
alert(textStatus);
}
});
return false;
});
}); |
Je ne comprends pas bien le but final de :
1 2
| var page = $(this).attr("href");
page = page.replace("index.php","produits.php"); |
S'il s'agit de modifier le lien dans this, il faut écrire :
$(this).attr("href", "produits.php");
Partager