Team:ETH Zurich/labblog/buttons
From 2014.igem.org
(Difference between revisions)
Line 15: | Line 15: | ||
$("article").hide().filter('.' + filtertag).show(); | $("article").hide().filter('.' + filtertag).show(); | ||
}); | }); | ||
- | |||
- | + | ||
+ | |||
$('.link-sort-list').on("click", function() { | $('.link-sort-list').on("click", function() { | ||
- | $("#sort-list article") | + | $("#sort-list article").sort(function (a, b) { |
- | .sort(function (a, b) { | + | |
return parseInt(a.date > parseInt(b.date); | return parseInt(a.date > parseInt(b.date); | ||
- | }) | + | }).each(function(){ |
- | .each(function(){ | + | |
var elem = $(this); | var elem = $(this); | ||
elem.remove(); | elem.remove(); |