jQuery-One-Page-Nav | Smooth scrolling and smart navigation | Navigation library
kandi X-RAY | jQuery-One-Page-Nav Summary
kandi X-RAY | jQuery-One-Page-Nav Summary
A lightweight jQuery plugin for the navigation on one-page sites. Adds smooth scrolling when clicking on the navigation and automatically selects the correct navigation items as you are scrolling through the different sections. The plugin still works even if you add additional content to the page after the fact that changes the position of each section.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jQuery-One-Page-Nav
jQuery-One-Page-Nav Key Features
jQuery-One-Page-Nav Examples and Code Snippets
Community Discussions
Trending Discussions on jQuery-One-Page-Nav
QUESTION
How can I create a sticky navbar with the vertical bar on the right and a bullet point (the circle):
http://retail.cegid.com/fr/avril-2020-votre-newsletter-clients/
My HTML :
...ANSWER
Answered 2020-Oct-14 at 16:06Here's my solution to the problem. It would be preferable to carry this out with CSS, but the constraint of not changing around the HTML made that impossible (as far as I can tell).
A few things to note:
You're using a JQuery plugin which you've just copied and pasted here. As it turns out, this was rather fortuitous because I had to fix a problem with the plug-in itself. I needed the begin
callback to be passing the element being clicked on, but it wasn't doing this, so I added it in. This means though that this solution wont work with the OnePageNav plug-in as it stands. I personally don't think it matters if you just import it into your own code because it isn't very big, and also it doesn't seem to be maintained anymore, so there probably wont be any more releases of it anyway.
I've also edited your code quite a bit in order to remove things which weren't relevant to the problem in hand to make it easier for me to understand. I also want to the solution to be as general as possible so that other people might be able to benefit from this too. I've kept the 'spirit' of your code though so I don't think you should have any problems should you want to adopt this solution.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jQuery-One-Page-Nav
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page