jQuery-slimScroll icon indicating copy to clipboard operation
jQuery-slimScroll copied to clipboard

click on rail

Open cina2012 opened this issue 11 years ago • 3 comments

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.

cina2012 avatar Aug 06 '13 01:08 cina2012

bump up,

is there such feature like clicking on rail anyway? if so, it's not working

rootten avatar Apr 03 '14 10:04 rootten

Hi Tnx for response Please See The Image 1 and 2

1

2

cina2012 avatar Apr 03 '14 10:04 cina2012

@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

vsangolli avatar Jan 09 '18 09:01 vsangolli