|
|
|
@ -119,8 +119,42 @@ category: tests
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
|
|
|
|
|
|
|
var $container = $('#container'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$container.isotope({ |
|
|
|
|
itemSelector : '.element', |
|
|
|
|
masonry : { |
|
|
|
|
columnWidth : 120 |
|
|
|
|
}, |
|
|
|
|
animationEngine : $.browser.opera ? 'jquery' : 'best-available', |
|
|
|
|
getSortData : { |
|
|
|
|
symbol : function( $elem ) { |
|
|
|
|
return $elem.attr('data-symbol'); |
|
|
|
|
}, |
|
|
|
|
category : function( $elem ) { |
|
|
|
|
return $elem.attr('data-category'); |
|
|
|
|
}, |
|
|
|
|
number : function( $elem ) { |
|
|
|
|
return parseInt( $elem.find('.number').text(), 10 ); |
|
|
|
|
}, |
|
|
|
|
weight : function( $elem ) { |
|
|
|
|
return parseFloat( $elem.find('.weight').text().replace( /[\(\)]/g, '') ); |
|
|
|
|
}, |
|
|
|
|
name : function ( $elem ) { |
|
|
|
|
return $elem.find('.name').text(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% include random-sizes.js %} |
|
|
|
|
|
|
|
|
|
{% include sort-buttons.js %} |
|
|
|
|
|
|
|
|
|
$('#filters').find('a').click(function(){ |
|
|
|
|
// get href attribute, minus the #, plus a . to make it a class |
|
|
|
|
var filterName = '.' + $(this).attr('href').slice(1); |
|
|
|
@ -129,8 +163,6 @@ category: tests
|
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include sort-buttons.js %} |
|
|
|
|
|
|
|
|
|
// change size of clicked element |
|
|
|
|
$container.find('.element').live('click', function(){ |
|
|
|
|
$(this).toggleClass('large'); |
|
|
|
@ -155,33 +187,5 @@ category: tests
|
|
|
|
|
{% include option-buttons.js %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
|
|
|
|
|
|
|
$container.isotope({ |
|
|
|
|
itemSelector : '.element', |
|
|
|
|
masonry : { |
|
|
|
|
columnWidth : 120 |
|
|
|
|
}, |
|
|
|
|
animationEngine : $.browser.opera ? 'jquery' : 'best-available', |
|
|
|
|
getSortData : { |
|
|
|
|
symbol : function( $elem ) { |
|
|
|
|
return $elem.attr('data-symbol'); |
|
|
|
|
}, |
|
|
|
|
category : function( $elem ) { |
|
|
|
|
return $elem.attr('data-category'); |
|
|
|
|
}, |
|
|
|
|
number : function( $elem ) { |
|
|
|
|
return parseInt( $elem.find('.number').text(), 10 ); |
|
|
|
|
}, |
|
|
|
|
weight : function( $elem ) { |
|
|
|
|
return parseFloat( $elem.find('.weight').text().replace( /[\(\)]/g, '') ); |
|
|
|
|
}, |
|
|
|
|
name : function ( $elem ) { |
|
|
|
|
return $elem.find('.name').text(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
</script> |