Reputation: 1
$(document).ready(function() {
// var nice = $("html").niceScroll(); // The document page (body)
var scroll_var = $(".panel").niceScroll({
cursorborder:"",
cursorcolor:"#00F",
boxzoom:true
});
scroll_var.scrollend(function(){
});
});
Getting scrollend is undefined.
Upvotes: 0
Views: 1393
Reputation: 1
You only have to pass "info" as parameter it will returns an object with x,y current position and also the event scroll ends
$(".panel").onscrollend = function(info) {
console.log("Scroll end")
console.log(info)
}
Upvotes: 0
Reputation: 7358
I'm not sure if you can even access that function. Try:
$(document).ready(function() {
$(".panel").niceScroll({
cursorborder:"",
cursorcolor:"#00F",
boxzoom:true
});
$(".panel").getNiceScroll().scrollend(function(){
});
});
Upvotes: 0