Team:ETH Zurich/labblog/buttons

From 2014.igem.org

(Difference between revisions)
Line 2: Line 2:
<script>
<script>
-
$("article").show();//if you want them shown to start with
+
    $(function() {
-
    $("button").on("click", function(){
+
        $("article").hide();
-
        var filtertag = $(this).attr('class');
+
        $("button").on("click", function(){
-
        $("article").hide().filter('.' + filtertag).show();
+
            var filtertag = $(this).attr('class');
-
    })
+
            $('.post').hide().filter('.' + filtertag).show();
-
[0].click();
+
        })
-
});
+
        [0].click();
 +
    });
</script>
</script>

Revision as of 09:44, 26 August 2014