Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navbar-fixed-top #15

Open
TheCTRL opened this issue Mar 26, 2013 · 3 comments
Open

navbar-fixed-top #15

TheCTRL opened this issue Mar 26, 2013 · 3 comments

Comments

@TheCTRL
Copy link

TheCTRL commented Mar 26, 2013

With fixed-top navbar doesn't display correctly

@mbertin
Copy link

mbertin commented Apr 16, 2013

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.

@gxclarke
Copy link

gxclarke commented May 8, 2013

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.

@clu3
Copy link
Owner

clu3 commented May 27, 2013

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants