Jquery工具带范围输入的垂直滚动
我试图使用Jquery工具范围输入来上下滚动一个div。我已经实现了它,但它不能正常工作 这是一个链接到页面,它在“公文包”选项卡上。。。 我的问题是范围滑块和滚动div不同步。当页面第一次加载时,滑块句柄位于输入范围的顶部,div位于包含包装器的页面顶部。如果我用滑块向下滚动,然后返回到输入范围的顶部,在div的顶部会有额外的空间。如果你尝试一下,你就会明白我的意思 这是我正在使用的脚本Jquery工具带范围输入的垂直滚动,jquery,input,range,Jquery,Input,Range,我试图使用Jquery工具范围输入来上下滚动一个div。我已经实现了它,但它不能正常工作 这是一个链接到页面,它在“公文包”选项卡上。。。 我的问题是范围滑块和滚动div不同步。当页面第一次加载时,滑块句柄位于输入范围的顶部,div位于包含包装器的页面顶部。如果我用滑块向下滚动,然后返回到输入范围的顶部,在div的顶部会有额外的空间。如果你尝试一下,你就会明白我的意思 这是我正在使用的脚本 $(function() { //PORT RANGE SLIDER // get handle to
$(function() {
//PORT RANGE SLIDER
// get handle to the scrollable DIV
var scroll = $("#portScrollable");
$(":range").rangeinput({
// slide the DIV along with the range using jQuery's css() method
onSlide: function(ev, step) {
scroll.css({bottom: -step});
},
progress: false,
// set prescision
prescision: 0,
// initial value. also sets the DIV's initial scroll position
value: 100,
// this is called when the slider is clicked. we animate the DIV
change: function(e, i) {
scroll.animate({bottom: -i}, "fast");
},
// disable drag handle animation when when slider is clicked
speed: 0
});
提前感谢您的帮助