Skip to content

Commit

Permalink
Added plugin option wrapContent (defaults to true for API compatibili…
Browse files Browse the repository at this point in the history
…ty). When false, we do not wrap .tse-content in .tse-scroll-content for when you can ensure that the DOM already has the desired structure.
  • Loading branch information
Yoh Suzuki committed Apr 5, 2013
1 parent 49b9c28 commit 40c2849
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/jquery.trackpad-scroll-emulator.js
Expand Up @@ -60,7 +60,9 @@
$scrollbarEl = $el.find('.tse-scrollbar');
$dragHandleEl = $el.find('.drag-handle');

$contentEl.wrap('<div class="tse-scroll-content" />');
if (options.wrapContent) {
$contentEl.wrap('<div class="tse-scroll-content" />');
}
$scrollContentEl = $el.find('.tse-scroll-content');

resizeScrollContent();
Expand Down Expand Up @@ -294,7 +296,8 @@

$.fn[pluginName].defaults = {
onInit: function() {},
onDestroy: function() {}
onDestroy: function() {},
wrapContent: true
};

})(jQuery);

0 comments on commit 40c2849

Please sign in to comment.