Browse Source

src : use $.data instead of $.fn.data where possible

see http://dropshado.ws/post/5805428861/jquery-data
pull/96/head
David DeSandro 14 years ago
parent
commit
09cd776c30
  1. 6
      jquery.isotope.js

6
jquery.isotope.js

@ -535,8 +535,8 @@
for ( var key in getSortData ) { for ( var key in getSortData ) {
sortData[ key ] = getSortData[ key ]( $this, instance ); sortData[ key ] = getSortData[ key ]( $this, instance );
} }
// apply sort data to $element // apply sort data to element
$this.data( 'isotope-sort-data', sortData ); $.data( this, 'isotope-sort-data', sortData );
if ( isIncrementingElemCount ) { if ( isIncrementingElemCount ) {
instance.elemCount ++; instance.elemCount ++;
} }
@ -564,7 +564,7 @@
}, },
_getSorter : function( elem, sortBy ) { _getSorter : function( elem, sortBy ) {
return $(elem).data('isotope-sort-data')[ sortBy ]; return $.data( elem, 'isotope-sort-data' )[ sortBy ];
}, },
// ====================== Layout Helpers ====================== // ====================== Layout Helpers ======================

Loading…
Cancel
Save