Socialking

Untitled

Dec 9th, 2021
711
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Smooth scrolling with links
  2. $('a[href*=\\#]').on('click', function(event){    
  3.     event.preventDefault();
  4.     $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
  5. });
  6.  
  7. // Smooth scrolling when the document is loaded and ready
  8. $(document).ready(function(){
  9.   $('html,body').animate({scrollTop:$(location.hash).offset().‌​top}, 500);
  10. });
RAW Paste Data