Ajax
$.ajax({
url: "test.html",
type: "POST",
data: {"data1":1,"data2":2}
}).done(function() {
$(this).addClass("done");
});
$.ajax({
url: "index.php",
type: "POST",
data: {"act":"Turnos.getHorarioDisponible","dia":dateText},
beforeSend: function(){
$("#horarios").html("Cargando horarios disponibles...");
}
}).done(function(htmls) {
$(this).addClass("done");
});