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
| $(function(){
$('.1000sondages input[type="submit"]').hide();
$('.1000sondages[type="radio"]').click(function(){
$('.1000sondages input[type="submit"]').fadeIn();
});
$(".1000sondages").submit(function(){
$checked = $('.1000sondages[type="radio"]:checked').val();
$question = $('.1000sondages[name="question"]').val();
$.post("http://www.quentin-le-bevillon.fr/test/traitement.php", { reponse: $checked , question: $question }, function(data){
alert(data);
});
return false; // Enfin j'effectue un return false pour que l'attribut "action=" du formulaire ne soit pas pris en compte.
});
}); |
Partager