From 7b3a56e2a61bc150fef4a8bdca3db19ea8e19a41 Mon Sep 17 00:00:00 2001 From: chawkinsuf Date: Sat, 16 Mar 2013 16:28:43 -0400 Subject: [PATCH] Add ability to force a resize after contents of an existing slimscroll object have changed --- jquery.slimscroll.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js index eada791..15062e0 100644 --- a/jquery.slimscroll.js +++ b/jquery.slimscroll.js @@ -102,6 +102,15 @@ // check if we should scroll existing instance if ($.isPlainObject(options)) { + // Pass height: auto to an existing slimscroll object to force a resize after contents have changed + if ( 'height' in options && options.height == 'auto' ) { + me.parent().css('height', 'auto'); + me.css('height', 'auto'); + var height = me.parent().parent().innerHeight(); + me.parent().css('height', height); + me.css('height', height); + } + if ('scrollTo' in options) { // jump to a static point