Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Last active December 19, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonmarkgo/5959986 to your computer and use it in GitHub Desktop.
Save jonmarkgo/5959986 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$("#enter_number").submit(function(e) {
e.preventDefault();
initiateCall();
});
});
function initiateCall() {
$.post("call.php", { phone_number : $("#phone_number").val() },
function(data) { showCodeForm(data.verification_code); }, "json");
checkStatus();
}
function showCodeForm(code) {
$("#verification_code").text(code);
$("#verify_code").fadeIn();
$("#enter_number").fadeOut();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment