javascript - How to synchronize two scrollbars for divs with different style overflow -


i have problem trying sync scroll in divs, have 2 divs, first div has style overflow: hidden , second div has style overflow:scroll,then found several answers sync scroll in divs using jquery example :

$("#div2").scroll(function () {      $("#div1").scrolltop($(this).scrolltop()); }); 

http://jsfiddle.net/gqhyw/43/

but have problem solution because @ bottom of scroll divs desynchronized , see image .

enter image description here

someone has idea how solve error.

thank in advance

your horizontal scroll showing despite not needing there. can target horizontal scroll , hide it, while keeping vertical scroll:

.bottom {     left     : 50%;     overflow-y : scroll;     overflow-x : hidden; } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -