diff options
author | Arvind <heyarviind@gmail.com> | 2018-07-27 23:36:30 +0300 |
---|---|---|
committer | Arvind <heyarviind@gmail.com> | 2018-07-27 23:36:30 +0300 |
commit | 6921f12c40dfdbde9185f41f99e752b800c0ffaa (patch) | |
tree | 8dff9d574693502da393be22451a936119764374 | |
parent | d82a9289b1ce2019a0cb0244eae281117a16d760 (diff) |
update contact submission
-rw-r--r-- | static/js/script.js | 20 |
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; + }) + } } }); |