$("#mask_codes").keyup(function(e) {
if(document.getElementById("mask_codes").value.length > 5 ) {
$("#verif_ico").html("<i class='fal fa-spinner fa-pulse text-info'></i>").fadeIn("slow");
$.post("_check-sms.php", {
code_sms: $(this).val()
}, function(datas){
if (datas == 'yes') {
$("#verif_ico").show();
$("#verif_ico").fadeTo(200, 0.1, function() {$(this).html("<i class='fas fa-check text-success'></i>").fadeTo(900, 1);});
$("#btn_confirmer").attr("disabled", false);
} else {
$("#verif_ico").show();
$("#verif_ico").fadeTo(200, 0.1, function() {$(this).html("<i class='fas fa-ban text-danger'></i>").fadeTo(900, 1);});
$("#btn_confirmer").attr("disabled", true);
}
});
}
});
ASKER
jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.
TRUSTED BY
ASKER
Open in new window