Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- $(".ajaxForm").submit(function(e){
- e.preventDefault();
- var href = $(this).attr("action");
- var enviado = $(".enviado")
- $.ajax({
- type: "POST",
- dataType: "json",
- url: href,
- data: $(this).serialize(),
- success: function(response){
- if(response.status == "success"){
- enviado.addClass("block");
- }else{
- alert("Error " + response.message);
- }
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement