sxalexander / jquery-scrollspy Goto Github PK
View Code? Open in Web Editor NEWA JQuery Implementation of David Walsh's MooTools scrollspy
A JQuery Implementation of David Walsh's MooTools scrollspy
We at VersionEye are working hard to keep up the quality of the bower's registry.
We just finished our initial analysis of the quality of the Bower.io registry:
7530 - registered packages, 224 of them doesnt exists anymore;
We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).
Sadly, your library sxalexander/jquery-scrollspy
is one of them.
Can you spare 15 minutes to help us to make Bower better?
Just add a new file bower.json
and change attributes.
{
"name": "sxalexander/jquery-scrollspy",
"version": "1.0.0",
"main": "path/to/main.css",
"description": "please add it",
"license": "Eclipse",
"ignore": [
".jshintrc",
"**/*.txt"
],
"dependencies": {
"<dependency_name>": "<semantic_version>",
"<dependency_name>": "<Local_folder>",
"<dependency_name>": "<package>"
},
"devDependencies": {
"<test-framework-name>": "<version>"
}
}
Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.
NB! Please validate your bower.json with jsonlint before commiting your updates.
Thank you!
Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!
Is this being maintained any more? If not I will gladly take over the project or at best become a contributor to the project.Just check out the projects I contributed to and you will see I have a fairly decent understanding of JS/jQuery. I feel this plugin has great potential =)
There are quire a few errors as well as a possible variable leak with the current code base, that I would fix, but considering PRs aren't being accepted/commented, I am a little reluctant to do so until I have an understanding that the project is still being maintained.
A couple of things I would change/add:
Which element should I fire the function scrollspy?
Can I do like this?
$('body').scrollspy({
min: $('#banner').offset().top,
onEnter: function() {
console.log('enter');
},
onLeave: function() {
console.log('leave');
}
});
Hi - could be my layout - I'm using this with a 100% height div with overflow: auto in that triggers when a "more" classed div is scrolled to. This uses ajax to get more content.
There may be multiple of these divs on a page since I'm using tabs.
Unfortunately, whilst it was triggering correctly, in Chrome it was also triggering when the page loads initially. I've patched the code in the following way...
Line 73 modified to...
if (typeof lastTick != 'number' && typeof lastTick!='undefined') {
(added to also ignore "undefined" in the trigger.
This now works for me as expected. Afraid I'm new to Github, so apologies if I've submitted in the wrong place, or not included enough information.
Is the navigation in this example supposed to disappear half way down the page? At first I thought it was a bug in my own implementation, but it's in example /fixednav.html as well. Bug or feature?
Hi,
Are there any tricks in making scrollspy work correctly after the height of an element changed after window load?
Thanks
I could provide an example
I am using your great spy component with ScrollTo which scrolls to a certain portion of the page when a url with a #hash is clicked.
It works awesome! except for one little issue.
I want to be able to fire events about 500 seconds after scrolling has stopped. I dont know if settimout is appropriate for this since it is running on .each .
The reason for this is I want to change the classes on nav links based on where the scrolling is once it has completed. Otherwise the nav links go nuts during a scroll from page start to page end. Everything in between gets the onEnter onleave event and the navs light up one after the other. Also want to use this on my onepage site to TrackPageview on google analytics, and dont want extra pageviews popping in as they are scrolled trhoug.
Can you advise me on the proper way to wait until scrolling has completed to fire an event?
This would be amazing
Hi,
I found this issue while using your plugin on our website. I made a little video to show you what is happening. Focus on the black and white logo in the nav bar. This also happens in your example code. Issue confirmed in Safari/Chrome on Win/Mac; https://dl.dropbox.com/u/14655800/scrollspyBug.m4v
I used to fix this issue by adding:
max: $('body').height()
to the options
Cheers,
Wolfgang
I have an element that should become "fixed" when scrolled beyond certain point. Is there a way to initialise it with a "min" value only? Other than setting "max" to infinity :)
This is bad practice to include another user's library for the purposes of demonstration. The best approach would be to link to a Bootsrap CDN.
I have removed in my version of this library.
Hello. Would love add your plugin to Rails Assets but it needs a version number. Can you create a release for this?
I could easily fork it and create a release from there, but I think it'd be best if Rails Assets references your repo. In case there are updates in the future. Thanks a lot!
The bootstrap scrollspy has a 'refresh' function to refresh the max/min values upon say an ajax load, to recalculate the max/min area.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.