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()); });
but have problem solution because @ bottom of scroll divs desynchronized , see image .
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
Post a Comment