From 6921f12c40dfdbde9185f41f99e752b800c0ffaa Mon Sep 17 00:00:00 2001 From: Arvind Date: Sat, 28 Jul 2018 02:06:30 +0530 Subject: update contact submission --- static/js/script.js | 20 +++++++++++--------- 1 file 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; + }) + } } }); -- cgit v1.2.3