Method scrollTop() - works wrong in Internet Explorer
Hello Everyone,
I am facing an issue with the method "scrollTop".
I have 2 div tags what are the same sizes of height, width and the vertical scroll bar. when I scroll the first div,
I want that the second div is also scrolled in the same position with the first div . I implemented this by the way:
$('div_id2').scrollTop($('div_id1').scrollTop());
It works fine in Firefox and Chrome, but I got a small position deviation between 2 vertical scroll bars of the div tags in IE
.
when I try to log the values:
console.log('div_id1:' +
$('div_id1').scrollTop());
console.log('div_id2:' + $('div_id2').scrollTop());
=> result in Chrome, Firefox:
div_id1:44.545454446934474
div_id2:44.545454446934474
=> result in Internet Explorer:
div_id1:45
div_id2:45
I am not sure that the difference causes
getting a small position deviation between 2 vertical scroll bars, or not?
Please help me how to overcome this issue!
Many thanks,