diff options
author | Guillermo Guerrero <wolf.fox1985@gmail.com> | 2016-10-11 10:00:49 +0300 |
---|---|---|
committer | Guillermo Guerrero <wolf.fox1985@gmail.com> | 2016-10-11 10:00:49 +0300 |
commit | 892c966e5b5f4734e449b12c8c96f155026318db (patch) | |
tree | b14694a4c166f2bd4ce97d0bb12da23a625d96ce /static | |
parent | e6a7e10161f6d1f3e3bc399194e0942ebcfedd41 (diff) |
Reset inputs.
Better rendering succesfull text with div alert.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/front.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/static/js/front.js b/static/js/front.js index 0a9d274..9d33350 100644 --- a/static/js/front.js +++ b/static/js/front.js @@ -29,12 +29,14 @@ function contactForm() { $.post($(this).attr('action'),
$this.serialize(),
function(data) {
- $this
- .prev()
- .text("Thank you for getting in touch! We appreciate you contacting us, we try to respond as soon as possible. Have a great day ahead!.")
- .fadeIn()
- .delay(3000)
- .fadeOut();
+ $this.reset(); // clear form
+
+ $this
+ .prev() + .html("<div class='alert alert-success' role='alert'>Thank you for getting in touch! We appreciate you contacting us, we try to respond as soon as possible. Have a great day ahead!.</div>")
+ .fadeIn()
+ .delay(3000)
+ .fadeOut();
}
,'json');
return false;
|