Giter Club home page Giter Club logo

Comments (5)

tscanlin avatar tscanlin commented on May 25, 2024

Affix just seems to make the menu fixed position at a certain scroll point. This is different than zenscroll which makes the scrolling animation smooth. Tocbot has the functionality of affix by using the following options:

// Fixed position class to add to make sidebar fixed after scrolling
// down past the fixedSidebarOffset.
positionFixedClass: 'is-position-fixed',
// fixedSidebarOffset can be any number but by default is set
// to auto which sets the fixedSidebarOffset to the sidebar
// element's offsetTop from the top of the document on init.
fixedSidebarOffset: 'auto',

from tocbot.

giorgio79 avatar giorgio79 commented on May 25, 2024

Tried that but no luck :)

Also, for the scrolling do I have to include zenscroll as well? Or is it included in tocbot.js?

Hmm seems not https://github.com/tscanlin/tocbot/search?utf8=%E2%9C%93&q=zenscroll&type=
Will have to do that manually :) For a moment the tut had me believe that dependency is merged into tocbot.min.js

from tocbot.

tscanlin avatar tscanlin commented on May 25, 2024

You just need Tocbot. Zenscroll is included.

from tocbot.

tscanlin avatar tscanlin commented on May 25, 2024

Is it ok to close this issue?

from tocbot.

giorgio79 avatar giorgio79 commented on May 25, 2024

Yes, many thx!

from tocbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.