mirror of https://github.com/metafizzy/isotope
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.
16 lines
505 B
16 lines
505 B
14 years ago
|
|
||
|
// sorting
|
||
|
$('#sort a').click(function(){
|
||
|
// get href attribute, minus the #
|
||
|
var $this = $(this),
|
||
|
sortName = $this.attr('href').slice(1),
|
||
|
asc = $this.parents('.sort').hasClass('asc');
|
||
|
// var sortTest = 'sort ' + sortName + ' ' + direction;
|
||
|
// console.time( sortTest );
|
||
|
$demo.isotope({
|
||
|
sortBy : sortName,
|
||
|
sortAscending : asc
|
||
|
});
|
||
|
// console.timeEnd( sortTest );
|
||
|
return false;
|
||
|
});
|