jQuery-slimScroll
jQuery-slimScroll copied to clipboard
click on rail
hi thanx for nice work. i have a problem: click on rail not worked. when user clicked on rail, scroll must go to this position, but this not worked.
bump up,
is there such feature like clicking on rail anyway? if so, it's not working
Hi Tnx for response Please See The Image 1 and 2
@cina2012 - Even I faced the same issue one of the project. I have given a fix with following code.
Below code will increment and decrement the scroll top value with 20px. This code I have added in plugin itself.
rail.bind("click" , function(e){
var $doc = $(document);
var offset = $(this).offset();
isDragg = true;
var top = bar.position().top
t = parseFloat(bar.css('top'));
pageY = e.pageY - offset.top;
if(pageY > top) {
top += 20;
} else {
top -= 20;
}
bar.css('top', top);
scrollContent(0, top, false);// scroll content
isDragg = false;hideBar();
$doc.unbind('.slimscroll');
return false;
});
May be this code will help you.
Thanks