From 2ba4fe9996eaafd8c98aa93b28062e7b0a861695 Mon Sep 17 00:00:00 2001 From: prashant Date: Thu, 18 Aug 2016 15:15:17 +0530 Subject: formated the code --- js/smooth_scroll.js | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'js/smooth_scroll.js') diff --git a/js/smooth_scroll.js b/js/smooth_scroll.js index d16dc1a..10e9145 100755 --- a/js/smooth_scroll.js +++ b/js/smooth_scroll.js @@ -1,26 +1,25 @@ (function($) { - $(document).ready(function() { - $('a[href*=#]:not([href=#])').click(function() { - if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') - || location.hostname == this.hostname) { - - var target = $(this.hash); - target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); - if (target.length) { - $('html,body').animate({ - scrollTop: target.offset().top - }, 1000); - return false; - } - } - }); - $(".quick").click(function() { - $(".quick").removeClass("badge-success"); - $(this).addClass("badge-success"); - setTimeout(function() { - $(".quick").removeClass("badge-success"); - }, 4000); - }); - $('.quick').tooltip(); - }); + $(document).ready(function() { + $('a[href*=#]:not([href=#])').click(function() { + if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') + || location.hostname == this.hostname) { + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); + if (target.length) { + $('html,body').animate({ + scrollTop: target.offset().top + }, 1000); + return false; + } + } + }); + $(".quick").click(function() { + $(".quick").removeClass("badge-success"); + $(this).addClass("badge-success"); + setTimeout(function() { + $(".quick").removeClass("badge-success"); + }, 4000); + }); + //$('.quick').tooltip(); + }); })(jQuery); -- cgit