Jquery - Scroll a DIV(overflow:auto;) with a DIV -
how can scroll div (overflow:auto;) div?
html
<div style="width:100px; height:200px; border:1px solid #ff0000; overflow:hidden;"> <div id="my_div" style="width:100%; padding-right:20px; height:100%; overflow:auto;" class="sph"> <div style=" background-color:#c6c6c6; width:10px; height:20px; position: absolute; left:80px; cursor:pointer;" >s</div> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> .. content ... <br /> </div> </div> <br /><br > use mousescroll scroll or use [s]croll div
example http://jsfiddle.net/sbafw/11/
thanks in advance!
peter
check out jscrollpane plugin.
the first demo on the demo page might looking for. remove background attributes jspverticalbar , jsptrack classes , you're on way!
Comments
Post a Comment