Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed 'attribute' function after merge

Attribute option can be not only a CSS selector but also a function. Some of the previous merges/pull requests broke this feature. This commit brings it back.
  • Loading branch information...
commit ef7db66e5fedbfae1576c29831c5c3ff2df28fd3 1 parent 9fe2c0e
@razorjack authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 jquery.quicksand.js
View
6 jquery.quicksand.js
@@ -53,7 +53,11 @@ Github site: http://github.com/razorjack/quicksand
var val;
var animationQueue = []; // used to store all the animation params before starting the animation;
// solves initial animation slowdowns
- var $collection = $(collection).filter('[' + options.attribute + ']').clone(); // destination (target) collection
+ if (typeof(options.attribute) == 'function') {
+ var $collection = $(collection);
+ } else {
+ var $collection = $(collection).filter('[' + options.attribute + ']').clone(); // destination (target) collection
+ }
var $sourceParent = $(this); // source, the visible container of source collection
var sourceHeight = $(this).css('height'); // used to keep height and document flow during the animation
var sourceWidth = $(this).css('width'); // used to keep width and document flow during the animation

0 comments on commit ef7db66

Please sign in to comment.
Something went wrong with that request. Please try again.