Skip to content

Commit

Permalink
Fixed 'attribute' function after merge
Browse files Browse the repository at this point in the history
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
razorjack committed Dec 8, 2012
1 parent 9fe2c0e commit ef7db66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jquery.quicksand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef7db66

Please sign in to comment.