.animate qui ne fonctionne pas
Bonjour,
J'essaie de faire un .animate sur une balise TD mais mon code ne produit aucun changement.
L’évènement doit se produire en réponse à une requête AJAX c'est pour cela que j'ai mis les "alert".
Code:
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
|
<td class="td_heure">
<span id="lundi_00h00_00h30" >00:00 - 00:30</span>
</td>
<script>
$( "#lundi_00h00_00h30" ).click(function(){
alert("Click");
var request_update_opening_hours = $.ajax({
url: "../includes/modif_opening_hours.php",
type: "GET",
data: {
site_id: "<?php echo $current_site_id; ?>",
plage: "lundi_00h00_00h30"
},
dataType: "html"
});
request_update_opening_hours.done(function(retour_ajax){
alert("reception OK.");
$( "#lundi_00h00_00h30" ).animate({
backgroundColor: "#ff0000",
color: "#fff"
},
1000 );
});
});
</script> |
J'ai bien les 2 "alert" qui s'affichent.
Quelqu'un peut me dire d'ou vient mon erreur ?
Merci d'avance