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

github.com/uicardiodev/hugo-sodium-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind <heyarviind@gmail.com>2018-07-27 23:36:30 +0300
committerArvind <heyarviind@gmail.com>2018-07-27 23:36:30 +0300
commit6921f12c40dfdbde9185f41f99e752b800c0ffaa (patch)
tree8dff9d574693502da393be22451a936119764374
parentd82a9289b1ce2019a0cb0244eae281117a16d760 (diff)
update contact submission
-rw-r--r--static/js/script.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/static/js/script.js b/static/js/script.js
index 65fb3e7..7ee9d02 100644
--- a/static/js/script.js
+++ b/static/js/script.js
@@ -56,15 +56,17 @@ $(document).ready(function(){
//Smooth scroll
$("a, button").click(function(event){
- if(this.hash !== ""){
- event.preventDefault();
- var hash = this.hash;
-
- $("html, body").animate({
- scrollTop: $(hash).offset().top
- }, 800, function(){
- window.location.hash = hash;
- })
+ if($(this).attr('type') != 'submit'){
+ if(this.hash !== ""){
+ event.preventDefault();
+ var hash = this.hash;
+
+ $("html, body").animate({
+ scrollTop: $(hash).offset().top
+ }, 800, function(){
+ window.location.hash = hash;
+ })
+ }
}
});