jnicol / trackpad-scroll-emulator

A jQuery plugin that emulates OSX trackpad-style scrollbars in any browser or platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Horizontal scroll issue

bb245 opened this issue · comments

Tried to invoke the horizontal scroll emulator on a click of button for the demo2 as-is in index.html like:

$('.add-boxes').on('click', function(e){
e.preventDefault();
$('.demo2 .tse-content .boxes').append('

11
');
$('.demo2').TrackpadScrollEmulator('recalculate');
});

The scrollbar size is not recalculated and the boxes wrap down is there anything vital missing .

@bb245 I have updated the demo to include adding content to the horizontal scroller, as well as toggling its width. The problem was with the demo's CSS, not the plugin: I was setting an explicit width for the horiz scroller's content element. Now it is an inline-block element with white-space: nowrap.