Permalink
Browse files

BUGFIX Fixed overflow settings in jQuery.fitheighttoparent

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@103292 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 21aa2c6 commit d565c5021ba9fc121fa120be3656268a962859cc @chillu chillu committed Apr 21, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 javascript/jquery-fitheighttoparent/jquery.fitheighttoparent.js
@@ -23,6 +23,7 @@ jQuery.fn.extend({
if($this.is(':visible') && $this.parent().is(':visible')) {
// we set overflow = hidden so that large children don't muck things up in IE6 box model
+ var origParentOverflow = $this.parent().css('overflow');
$this.parent().css('overflow', 'hidden');
// get height from parent without any margins as a starting point,
@@ -47,6 +48,9 @@ jQuery.fn.extend({
// set new height
$this.height(height);
+
+ // Reset overflow
+ $this.parent().css('overflow', origParentOverflow);
}
});
}

0 comments on commit d565c50

Please sign in to comment.