Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- //SELETOR, EVENTO OU EFEITO, CALLBACK E AÇÃO
- $('.j_formsubmit').submit(function(){
- var form = $(this);
- var data = $(this).serialize();
- $.ajax({
- url: 'ajax/customer.php',
- data: data,
- type: 'POST',
- dataType: 'json',
- beforeSend: function () {
- form.find('.img_load').fadeIn(500);
- console.log('Teste do console -----');
- },
- success: function (resposta) {
- if(resposta.error){
- console.log('Não funcionou');
- }else{
- console.log('Funcionou');
- }
- form.find('.img_load').fadeOut(500);
- }
- });
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement