Code or script "Loading ..." [closed]

-3

I would like to know what code or script to appear that famous phrase ( Loading ... ).

Can anyone help me?

    
asked by anonymous 26.08.2016 / 05:46

1 answer

2

can be done with ajax when loading requests

$('document').ready(function(){

        $("#btn-login").click(function(){
            var data = $("#login-form").serialize();

            $.ajax({
                type : 'POST',
                url  : '../php/seila.php',
                data : data,
                dataType: 'json',
                beforeSend: function()
                {   
                    $("#btn-login").html('Carregando...'); <---
                },
                success :  function(response){                      


                }
            });
        });

    });     
    
26.08.2016 / 07:19