WordPress.org

Support

Support » How-To and Troubleshooting » Need a smooth scroll to anchor

Need a smooth scroll to anchor

  • I can’t find a plugin for this – I’m sure t exist – maybe I’m not searching for the right keywords

    I want a smooth scroll to an anchor using something like Jquery

    Any pointers would be great

    Thanks

    Omar

Viewing 1 replies (of 1 total)
  • crs1138
    Member

    @crs1138

    I’m trying to get this working

    http://www.sycha.com/jquery-smooth-scrolling-internal-anchor-links

    but, I get an JS error in the console, when trying to click on posts permalink, saying:

    Uncaught TypeError: Cannot read property ‘top’ of null /category/birth-stories/:412
    (anonymous function) /category/birth-stories/:412
    f.event.dispatch jquery.js:3
    f.event.add.h.handle.i

    regarding this bit of code

    $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);

Viewing 1 replies (of 1 total)
  • The topic ‘Need a smooth scroll to anchor’ is closed to new replies.