custom.js 570 B

123456789101112131415161718
  1. $(document).ready(function() {
  2. //smooth scroll
  3. $(function() {
  4. $('.scroll').click(function() {
  5. if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
  6. var target = $(this.hash);
  7. target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
  8. if (target.length) {
  9. $('html, body').animate({
  10. scrollTop: target.offset().top - 69
  11. }, 800);
  12. return false;
  13. }
  14. }
  15. });
  16. });
  17. });