From 67674d53ff1be2644df10973b061d7455ce283ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Pihlstr=C3=B6m?= Date: Tue, 17 Sep 2013 15:15:31 -0700 Subject: [PATCH] oncomplete fix --- README.md | 10 +--------- jquery.nested.js | 11 +++++++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a813a5b..1511f4d 100644 --- a/README.md +++ b/README.md @@ -3,21 +3,13 @@ jQuery Nested plugin for a gap free, multi column grid layout experience.
Demo: [http://suprb.com/apps/nested/](http://suprb.com/apps/nested/) -#### Changelog - -- **1.01** -Fixed bug when first element was not rendered - -- **1.0** -Initial release - #### Contributor [Jonas Blomdin](http://github.com/jonasblomdin/) #### Compare the result -Nested to the left and Grid-A-Licious, Masonry to the right. +Nested to the left and Grid-A-Licious/Masonry to the right. !["compare"](https://dl.dropbox.com/u/35476/compare.jpg) diff --git a/jquery.nested.js b/jquery.nested.js index 773b79a..bdb1d75 100644 --- a/jquery.nested.js +++ b/jquery.nested.js @@ -1,5 +1,5 @@ /** - * jQuery Nested v1.01 + * jQuery Nested v1.02 * * For a (total) gap free, multi column, grid layout experience. * http://suprb.com/apps/nested/ @@ -417,7 +417,7 @@ if (!Object.keys) { 'top': value['y'] }, duration); t++; - if (t == $els.length) { + if (t == i) { complete.call(undefined, $els) } }, i * speed); @@ -436,7 +436,7 @@ if (!Object.keys) { 'top': value['y'] }, duration); t++; - if (t == $els.length) { + if (t == i) { complete.call(undefined, $els) } }, i); @@ -453,11 +453,14 @@ if (!Object.keys) { 'top': value['y'] }); t++; - if (t == $els.length) { + if (t == i) { complete.call(undefined, $els) } } }); + if (i == 0) { + complete.call(undefined, $els) + } }, append: function ($els) {