From 03144305cd4a0f502d79a61f40b8bdb95e7c82fb Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Thu, 24 Feb 2011 22:34:21 -0500 Subject: [PATCH] src : isoTransform.set : cache $(elem); better namespace for data 'isoTransform' --- jquery.isotope.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jquery.isotope.js b/jquery.isotope.js index df045ce..041ff74 100644 --- a/jquery.isotope.js +++ b/jquery.isotope.js @@ -184,15 +184,16 @@ , set : function( elem, name, value ) { - - // unpack current transform data - var data = $( elem ).data('transform') || {}, - // extend new value over current data + var $elem = $(elem), + // unpack current transform data + data = $elem.data('isoTransform') || {}, newData = {}, fnName, transformObj = {}; - // overwrite new data + + // i.e. newData.scale = 0.5 newData[ name ] = value; + // extend new value over current data $.extend( data, newData ); for ( fnName in data ) { @@ -210,7 +211,7 @@ valueFns = translateFn + scaleFn; // set data back in elem - $( elem ).data( 'transform', data ); + $elem.data( 'isoTransform', data ); // set name to vendor specific property elem.style[ isoTransform.transformProp ] = valueFns;