Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/devcows/hugo-universal-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorVittorio Alfieri <vittorio88@gmail.com>2019-04-09 22:37:12 +0300
committerGuillermo Guerrero Ibarra <wolf.fox1985@gmail.com>2019-04-09 22:37:12 +0300
commitcd3401ad5d6d18539a04d8a4aa260ca9db4113ef (patch)
tree0263e725ccf49437e4e34da3850ddd3a71036b01 /static
parent25e51a9385c35bad02d9c8da61e8d7e152cbba6c (diff)
Fix formspree. Add possibility to send request through plain HTTP POST (#203)
* Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. * Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. Improve hugo templating in contact.html * Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. Add toggle to exampleSite/config.toml * Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. Remove useless function. * Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. Use custom class only for ajax. * Fix formspree. Add possibility to send request through plain HTTP POST or ajax with toggle. Return if form is null.
Diffstat (limited to 'static')
-rw-r--r--static/js/front.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/static/js/front.js b/static/js/front.js
index 9e62ae7..14ee525 100644
--- a/static/js/front.js
+++ b/static/js/front.js
@@ -19,12 +19,13 @@ $(function () {
animations()
counters()
demo()
- contactForm()
+ contactFormAjax()
})
// Ajax contact
-function contactForm () {
- var form = $('.contact-form')
+function contactFormAjax () {
+ var form = $('.contact-form-ajax')
+ if (typeof form === 'undefined') return false
form.submit(function () {
$this = $(this)
$.post($(this).attr('action'),