Team:ETH Zurich/labblog/buttons

From 2014.igem.org

(Difference between revisions)
Line 18: Line 18:
$(document).ready(function() {
$(document).ready(function() {
-
     $('.link-sort-list').click(function(e) {
+
     $('.link-sort-list').on("click", function() {
-
$("#sort-list article").sort(function (a, b) {
+
$("#sort-list article")
-
     return parseInt(a.attr('date')) > parseInt(b.attr('date'));
+
.sort(function (a, b) {
-
}).each(function(){
+
     return parseInt(a.date > parseInt(b.date);
 +
})
 +
.each(function(){
     var elem = $(this);
     var elem = $(this);
     elem.remove();
     elem.remove();
     $(elem).appendTo("#sort-list");
     $(elem).appendTo("#sort-list");
})
})
-
        e.preventDefault();
 
     });
     });
});
});

Revision as of 16:54, 28 August 2014

View all Lab Weekly Meetings Modeling
Oldest Newest