From ea8eb90421d975838b5fa28c8e9760c19da0f3f2 Mon Sep 17 00:00:00 2001 From: Aen Tan Date: Tue, 27 Aug 2013 23:04:39 +0800 Subject: [PATCH] Container needs to be position: static See what happens if container happens to be position: relativecor anything other than static: http://jsfiddle.net/BdXPL/1/ This could happen if the container has other styles including non-static position. By having the JS overwrite the position, the user can at least know he needs to work around the position and not have to spend half an hour like me trying to see what's fucking up the offset. --- jquery.nested.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jquery.nested.js b/jquery.nested.js index 773b79a..7bf25a5 100644 --- a/jquery.nested.js +++ b/jquery.nested.js @@ -383,7 +383,10 @@ if (!Object.keys) { var self = this; // set container height - this.box.css('height', this._setHeight($els)); + this.box.css({ + 'height': this._setHeight($els), + 'position': 'static' + }); $els.reverse(); var speed = this.options.animationOptions.speed; @@ -495,4 +498,4 @@ if (!Object.keys) { return this; } -})(jQuery); \ No newline at end of file +})(jQuery);