1.6.0 • Published 7 years ago
scrollspy v1.6.0
scrollspy
scrollspy for jQuery
Installation
npm i scrollspy
Usage
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
scrollIn
scroll in handlerscrollOut
scroll out handlerclassName
add class when scroll in, remove class when scroll outonce
if 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: none
will be ignored
License
1.6.0
7 years ago
1.5.0
7 years ago
1.4.0
7 years ago
1.3.8
9 years ago
1.3.7
9 years ago
1.3.6
9 years ago
1.3.5
9 years ago
1.3.4
9 years ago
1.3.3
9 years ago
1.3.2
9 years ago
1.3.1
9 years ago
1.3.0
9 years ago
1.2.0
9 years ago
1.1.4
9 years ago
1.1.3
9 years ago
1.1.2
9 years ago
1.1.0
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago