Comments (8)
StickyNavbar script remembers the position of window that was before refresh.
If I understand well the problem are those buttons above the navigation on the right side (Share, Follow us etc.) If that's the case try to remove those elements out of the element on which StickyNavbar is called (header). If you have a development site please leave the link here in the comment or email me on jbutko [at] gmail.com and I will take a look on it.
from stickynavbar.js.
@jbutko Thank you very much, just sent you an email.
from stickynavbar.js.
I am having the same problem, and its still unclear how to fix it. Its live on the following (dutch) website: http://www.examentrainingexact.nl/examentraining/1-vwo-wiskunde-a
from stickynavbar.js.
@kaibakker: Hi, try to reference version 1.1.3 of stickyNavbar in the script tag instead of 1.1.1 http://cdn.jsdelivr.net/stickynavbar.js/1.1.3/jquery.stickyNavbar.min.js
Let me know if that helped.
from stickynavbar.js.
Thanks @jbutko for looking at it. But its still not working? I tried some different things and changed the version number, but still the bar is hanging on reload, any other ideas?
Thanks in advance
from stickynavbar.js.
@kaibakker: Hi, really not sure why this happened on your site, it looks like it is working fine on my demo page. Anyway you can probably fix it with this workaround (I do not tested it properly but it should work IMO):
var leftColVertPosition = $('.l-left').offset().top,
windowVerticalPos = $(window).scrollTop(),
menuBar = $('#menubar');
if (windowVerticalPos > leftColVertPosition) {
menuBar.style.top = "0";
}
Try it, adapt it if needed and let me know.
from stickynavbar.js.
Thank you! Works perfectly, eventual used this script...
$(document).ready(function () {
$('#menubar').stickyNavbar();
var leftColVertPosition = $('.l-left').offset().top,
windowVerticalPos = $(window).scrollTop(),
menuBar = $('#menubar');
if (windowVerticalPos > leftColVertPosition) {
menuBar.css({top: "0"});
}
});
from stickynavbar.js.
No problem Kai, glad I could help.
from stickynavbar.js.
Related Issues (20)
- Unable to get property 'top' of undefined or null referrence HOT 1
- Anchors with relative URL's don't work. HOT 3
- Add active class? HOT 2
- Option to Remove Target Links? HOT 2
- Could I change "nav bar position" style to vertical (not top)? HOT 3
- Two sections are highlighted at the same time.
- Use element.getBoundingClientRect().top rather than element.offsetTop HOT 1
- Last element is not being highlighted properly.
- When navbar isn't fixed, clicking on menu item takes you a little above start of section HOT 3
- Main window Scrollbar does not work when clicking to scroll. HOT 1
- Disappears on scroll
- Version Differential HOT 1
- jQuery conflict with li a[href*=#] HOT 1
- Relative links do not work in Bootstrap 3 or 4 HOT 3
- Error with relative links HOT 1
- publish latest version on NPM HOT 1
- About jquery.stickyNavbar.css HOT 2
- First child first click doesn't add activeClass
- Bootstrap 3 & 4 Dropdown support?
- Sticky nav sometime doesn't work in safari HOT 1
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 stickynavbar.js.