Advertisement
deliciousthemes

Untitled

Aug 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function() {
  2.  
  3.     jQuery(".home .site-branding a").attr("href", "#home");
  4.  
  5.     jQuery(".home .site-branding a").on('click', function() {
  6.         if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
  7.           var target = jQuery(this.hash);
  8.           target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
  9.           if (target.length) {
  10.             jQuery('html,body').animate({
  11.               scrollTop: target.offset().top
  12.             }, 900);
  13.             return false;
  14.           }
  15.         }
  16.     });
  17.  
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement