|
|
|
@ -119,44 +119,12 @@ category: tests
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var $container = $('#container'); |
|
|
|
|
|
|
|
|
|
$('#filters').find('a').click(function(){ |
|
|
|
|
// get href attribute, minus the #, plus a . to make it a class |
|
|
|
|
var filterName = '.' + $(this).attr('href').slice(1); |
|
|
|
|
filterName = filterName === '.show-all' ? '*' : filterName; |
|
|
|
|
$container.isotope({ filter: filterName }) |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include sort-buttons.js %} |
|
|
|
|
|
|
|
|
|
// change size of clicked element |
|
|
|
|
$container.find('.element').live('click', function(){ |
|
|
|
|
$(this).toggleClass('large'); |
|
|
|
|
$container.isotope('reLayout'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// toggle variable sizes of all elements |
|
|
|
|
$('#toggle-sizes').find('a').click(function(){ |
|
|
|
|
$container |
|
|
|
|
.toggleClass('variable-sizes') |
|
|
|
|
.isotope('reLayout'); |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include add-buttons.js %} |
|
|
|
|
|
|
|
|
|
$('#shuffle a').click(function(){ |
|
|
|
|
$container.isotope('shuffle'); |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include option-buttons.js %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $container = $('#container'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$container.isotope({ |
|
|
|
|
itemSelector : '.element', |
|
|
|
|
masonry : { |
|
|
|
@ -181,7 +149,43 @@ category: tests
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% 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); |
|
|
|
|
filterName = filterName === '.show-all' ? '*' : filterName; |
|
|
|
|
$container.isotope({ filter: filterName }) |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// change size of clicked element |
|
|
|
|
$container.find('.element').live('click', function(){ |
|
|
|
|
$(this).toggleClass('large'); |
|
|
|
|
$container.isotope('reLayout'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// toggle variable sizes of all elements |
|
|
|
|
$('#toggle-sizes').find('a').click(function(){ |
|
|
|
|
$container |
|
|
|
|
.toggleClass('variable-sizes') |
|
|
|
|
.isotope('reLayout'); |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include add-buttons.js %} |
|
|
|
|
|
|
|
|
|
$('#shuffle a').click(function(){ |
|
|
|
|
$container.isotope('shuffle'); |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
{% include option-buttons.js %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
</script> |