Did it work?
D
duezerouno
@duezerouno
Posts
-
Font Sampler plugin -
Smooth scroll with anchor@baumiao what's the difference in your snippet? it won't work :(
-
Smooth scroll with anchorHi Armin!
I am trying to use this snippet to scroll down in the page by clicking on a gridder item (icon).
jQuery(document).ready(function(){ jQuery('body').on('click', '#view-more', function(event) { event.preventDefault(); var id = jQuery(this).attr('href'); jQuery('html, body').animate( { scrollTop: jQuery(id).offset().top }, 750 ); }); })
this is the error I get:
Uncaught TypeError: Cannot read property 'top' of undefined
at HTMLDivElement.<anonymous> ((index):54)
at HTMLBodyElement.dispatch (jquery.js,qver=1.12.4.pagespeed.jm.pPCPAKkkss.js:1)
at HTMLBodyElement.r.handle (jquery.js,qver=1.12.4.pagespeed.jm.pPCPAKkkss.js:1)any idea? thank you!