From 40c2849023d874e7ab22cf8b339d326c7a7636a7 Mon Sep 17 00:00:00 2001 From: Yoh Suzuki Date: Thu, 4 Apr 2013 17:14:22 -0700 Subject: [PATCH] Added plugin option wrapContent (defaults to true for API compatibility). 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. --- js/jquery.trackpad-scroll-emulator.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/jquery.trackpad-scroll-emulator.js b/js/jquery.trackpad-scroll-emulator.js index d345dcd..cf699b4 100644 --- a/js/jquery.trackpad-scroll-emulator.js +++ b/js/jquery.trackpad-scroll-emulator.js @@ -60,7 +60,9 @@ $scrollbarEl = $el.find('.tse-scrollbar'); $dragHandleEl = $el.find('.drag-handle'); - $contentEl.wrap('
'); + if (options.wrapContent) { + $contentEl.wrap('
'); + } $scrollContentEl = $el.find('.tse-scroll-content'); resizeScrollContent(); @@ -294,7 +296,8 @@ $.fn[pluginName].defaults = { onInit: function() {}, - onDestroy: function() {} + onDestroy: function() {}, + wrapContent: true }; })(jQuery); \ No newline at end of file