Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions js/source/jquery.smoothDivScroll-1.3.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,17 @@
// setting of the hotspot backgrounds is started here as well for the same reason.
// If the auto scrolling is not started in $(window).load, it won't start because it
// will interpret the scrollable areas as too short.
$(window).load(function () {
$(window).load($.proxy(self._widthKnown, self));
if(o.additionalLoadEvents) {
//format: [{selector, event}]
$.each(o.additionalLoadEvents, function(i, n) {
$(n.selector).on(n.event, $.proxy(self._widthKnown, self));
});
}

},
_widthKnown: function() {
var o = this.options, self = this, el = this.element;
// If scroller is not hidden, recalculate the scrollable area
if (!(o.hiddenOnStart)) {
self.recalculateScrollableArea();
Expand Down Expand Up @@ -446,8 +455,6 @@

self._trigger("setupComplete");

});

},
/**********************************************************
_init
Expand Down