Merge pull request #36 from zenozeng/master
Use prop('scrollWidth') and prop('scrollHeight') instead of outerWidth() and outerHeight() to get the content size.
This commit is contained in:
commit
a8db04e41d
@ -70,8 +70,8 @@
|
||||
var updateBarSizeAndPosition = function () {
|
||||
containerWidth = $this.width();
|
||||
containerHeight = $this.height();
|
||||
contentWidth = $content.outerWidth(false);
|
||||
contentHeight = $content.outerHeight(false);
|
||||
contentWidth = $this.prop('scrollWidth');
|
||||
contentHeight = $this.prop('scrollHeight');
|
||||
if (containerWidth < contentWidth) {
|
||||
scrollbarXWidth = parseInt(containerWidth * containerWidth / contentWidth, 10);
|
||||
scrollbarXLeft = parseInt($this.scrollLeft() * containerWidth / contentWidth, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user