Team:ETH Zurich/labblog/buttons

From 2014.igem.org

(Difference between revisions)
Line 76: Line 76:
-
    $("article").hide();
+
$("article").hide();
-
    $("a#insidelink, area, button").on("click", function(){
+
$("a#insidelink, area").on("click", function(){
-
        var filtertag = $(this).attr('class');
+
 
-
        $("article").filter('.' + filtertag).toggle();
+
    var classList =$(this).attr('class').split(/\s+/);
 +
    $.each( classList, function(index, item){
 +
            $("article").filter('.' + item).toggle();
 +
            });
     });
     });

Revision as of 22:18, 7 October 2014