From 50d70241988d3d236d0d700e50038d0953f45942 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Tue, 28 Dec 2010 23:05:44 -0500 Subject: [PATCH] addAtoms -> addItems --- _posts/docs/2010-12-04-methods.mdown | 4 ++-- src/jquery.isotope.js | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/_posts/docs/2010-12-04-methods.mdown b/_posts/docs/2010-12-04-methods.mdown index ed5925b..0f458f4 100644 --- a/_posts/docs/2010-12-04-methods.mdown +++ b/_posts/docs/2010-12-04-methods.mdown @@ -20,8 +20,8 @@ These are some methods
-
addAtoms
-
.isotope( 'addAtoms', $content, callback )
+
addItems
+
.isotope( 'addItems', $content, callback )
diff --git a/src/jquery.isotope.js b/src/jquery.isotope.js index 1c42c62..8413619 100755 --- a/src/jquery.isotope.js +++ b/src/jquery.isotope.js @@ -344,7 +344,7 @@ // ====================== Convenience methods ====================== // adds a jQuery object of items to a isotope container - addAtoms : function( $content, callback ) { + addItems : function( $content, callback ) { var $newAtoms = this._filterFind( $content, this.options.itemSelector ); this._setupAtoms( $newAtoms ); // add new atoms to atoms pools @@ -361,7 +361,7 @@ this.element.append( $content ); var instance = this; - this.addAtoms( $content, function( $newAtoms ) { + this.addItems( $content, function( $newAtoms ) { $filteredAtoms = instance._filter( $newAtoms ); instance.$filteredAtoms = instance.$filteredAtoms.add( $filteredAtoms ); }); @@ -372,12 +372,8 @@ // convienence method for working with Infinite Scroll appended : function( $content, callback ) { - // var $newAtoms = this.addAtoms( $content ); - // this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms ); - // - // return this.layout( $newAtoms, callback ); var instance = this; - this.addAtoms( $content, function( $newAtoms ){ + this.addItems( $content, function( $newAtoms ){ instance.$filteredAtoms = instance.$filteredAtoms.add( $newAtoms ); instance.layout( $newAtoms, callback ) });