From 1f702a3e598e2ec52f362f331bdac7e44e3af458 Mon Sep 17 00:00:00 2001 From: Alexandre Rocha Lima e Marcondes Date: Wed, 4 Jul 2012 11:20:13 -0300 Subject: [PATCH] * Added quoting to the element lookup filters to allow for data-ids with punctuation in them, eg ".-,", etc * https://github.com/dalyons/quicksand/commit/b2f0895b9f55bbd3bd46ac50dc55bbb1916da9a1 --- jquery.quicksand.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery.quicksand.js b/jquery.quicksand.js index 626f490..1fcc892 100644 --- a/jquery.quicksand.js +++ b/jquery.quicksand.js @@ -201,7 +201,7 @@ Github site: http://github.com/razorjack/quicksand } }); } else { - destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); + destElement = $collection.filter('[' + options.attribute + '="' + $(this).attr(options.attribute) + '"]'); } if (destElement.length) { // The item is both in source and destination collections @@ -262,8 +262,8 @@ Github site: http://github.com/razorjack/quicksand } }); } else { - sourceElement = $source.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); - destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); + sourceElement = $source.filter('[' + options.attribute + '="' + $(this).attr(options.attribute) + '"]'); + destElement = $collection.filter('[' + options.attribute + '="' + $(this).attr(options.attribute) + '"]'); } var animationOptions; @@ -304,4 +304,4 @@ Github site: http://github.com/razorjack/quicksand } }); }; -})(jQuery); \ No newline at end of file +})(jQuery);