Created
January 17, 2016 12:32
-
-
Save rayets123/84883668f59ff0c69eeb to your computer and use it in GitHub Desktop.
форма Ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#form").submit(function() { | |
$.ajax({ | |
type: "POST", | |
url: "mail.php", | |
data: $(this).serialize() | |
}).done(function() { | |
alert("Спасибо за заявку!"); | |
setTimeout(function() { | |
$("#form").trigger("reset"); | |
}, 1000); | |
}); | |
return false; | |
}); | |
//Chrome Smooth Scroll | |
try { | |
$.browserSelector(); | |
if($("html").hasClass("chrome")) { | |
$.smoothScroll(); | |
} | |
} catch(err) { | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment