Comments (3)
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.
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.
@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)
- Needs version number
- popover defined width and small screens (mobile)
- All cdn dependencies in a single code block in tutorial HOT 1
- [enhancement] Add missing bower.json. HOT 2
- Bootstro Demo is broken in Chrome HOT 1
- Steps in json file HOT 4
- Demo for bootstrap 2 is now working HOT 2
- i18n HOT 1
- Steps for list item in dropdowns? HOT 3
- Popup is not over the bootstro background HOT 5
- How to add a Start button
- Responsive on element with position fixed HOT 1
- bootstro.js with bootstrap Modal HOT 3
- Option to remove arrows on selected popovers
- Next buttons don't appear in bootstro popover
- bootstro step on a element with ToolTip do not show step count e.g. 3/10
- not auto scrolling HOT 1
- automatic close (timeout) option
- bootstro width
- Support for Bootstrap 4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstro.js.