jqDoubleScroll
jqDoubleScroll copied to clipboard
incorrect topScrollBar width being set
When setting the width of the double scroll elements, you're setting the elements based on the $contentElement's outer width (line 92) but then resetting the $topScrollBar width to $self.width() (line 93).
The problem is that $self.width() subtracts borders on the table / table cells from the overall width.
Eg:
I have a table that is 750px wide with no border around it. The table's cells (th/td) have a 2px border on all sides.
$contentElement.outerWidth() = 750px; (this is the desired width) $self.width() = 746px; // 740px - 4px (cell border left and right)
The reset on line 93 is causing the top scrollbar to show unexpectedly because it's width is being set incorrectly. Outer width is a better solution as it behaves like css' box-sizing: border-box.
What is the purpose of the reset on line 93? Can that be removed given you're setting $topScrollBar's width on the line above (line 92)?
Thanks, Tom