Filter & sort magical layouts http://isotope.metafizzy.co
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
358 B

// add randomish size classes
$container.find('.element').each(function(){
var $this = $(this),
number = parseInt( $this.find('.number').text(), 10 );
if ( number % 7 % 2 === 1 ) {
$this.addClass('width2');
}
if ( number % 3 === 0 ) {
$this.addClass('height2');
}
});