1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| function EffetCarte(idpage, url, direction, vitesse){
if(direction == "suivant") {
var directionA = "right";
var directionB = "left";
}
else {
var directionA = "left";
var directionB = "right";
}
$("#carte").hide("drop", { direction : directionA }, vitesse);
setTimeout(function(){
$.post(url,
{ print: idpage },
function(data){
$("#carte").html(data);
$("#carte").show("drop", { direction : directionB }, vitesse);
});
}, vitesse);
return false;
}
$(".target-s a").live("click", function() {
var idpage = $(this).attr("id");
EffetCarte(idpage, "inc/carte_post.php", "suivant", 1000);
return false;
});
$(".target-p a").live("click", function() {
var idpage = $(this).attr("id");
EffetCarte(idpage, "inc/carte_post.php", "precedent", 1000);
return false;
}); |
Partager