Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ability to force a resize after contents of an existing slimscrol…

…l object have changed
  • Loading branch information...
commit 7b3a56e2a61bc150fef4a8bdca3db19ea8e19a41 1 parent a5fb1b6
@chawkinsuf chawkinsuf authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 jquery.slimscroll.js
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.