1.6.0 • Published 9 years ago
scrollspy v1.6.0
scrollspy
scrollspy for jQuery
Installation
npm i scrollspyUsage
var scrollspy = require('scrollspy')
$('.scroll-class').each(function() {
var me = this
var $me = $(me)
scrollspy.add(me, {
scrollIn: function() {
$me.addClass('show')
},
scrollOut: function() {
$me.removeClass('show')
}
})
})Api
Add
scrollspy.add(element, opt)scrollspy.add(element, scrollIn, scrollOut[, opt])scrollspy.add(element, className[, opt])
options
scrollInscroll in handlerscrollOutscroll out handlerclassNameadd class when scroll in, remove class when scroll outonceif trigger scroll in(no scroll out) just once, default false
Remove
remove element from checklist elements when scrolling
scrollspy.remove(el)
Tip
elements been scroll spied should be shown, which means
display: nonewill be ignored
License
1.6.0
9 years ago
1.5.0
9 years ago
1.4.0
9 years ago
1.3.8
10 years ago
1.3.7
10 years ago
1.3.6
10 years ago
1.3.5
10 years ago
1.3.4
10 years ago
1.3.3
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.4
10 years ago
1.1.3
10 years ago
1.1.2
10 years ago
1.1.0
10 years ago
1.0.1
11 years ago
1.0.0
11 years ago