Giter Site home page Giter Site logo

navbar-fixed-top about bootstro.js HOT 3 OPEN

TheCTRL avatar TheCTRL commented on June 10, 2024
navbar-fixed-top

from bootstro.js.

Comments (3)

mbertin avatar mbertin commented on June 10, 2024

This snippet of code could be helpful
In go_to() function.

             min = Math.min($(".popover.in").offset().top, $el.offset().top);
            //Fix navbar problem
            navbarHeight = $('.navbar-fixed-top').css("height");
            if($el.parents('.navbar-fixed-top').length == 0){
                $('body').animate({
                    scrollTop: min - navbarHeight},
                    'slow'
                );
            }else
            {
                if (idx == 0) //on step 0, if element in navbar, scoll to the top of body
                {
                    $("body").scrollTop(0);
                }
            }

Hope that will help you.

from bootstro.js.

gxclarke avatar gxclarke commented on June 10, 2024

This is actually a more generalized problem. My site has a fixed top area (not using the bootstrap navbar), and I experience the same problem. I suggest providing an option to specify the fixed top size that bootstro should not attempt to scroll into.

from bootstro.js.

clu3 avatar clu3 commented on June 10, 2024

@gxclarke @TheCTRL it's fixed with the latest commit. Please try setting the options.margin .
Also this commit fixed issue #2 as well. So it should be OK,hopefully

from bootstro.js.

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.