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 |
- | + | $("button").on("click", function(){ | |
- | $(" | + | var filtertag = $(this).attr('class'); |
- | + | $("article").hide().filter('.' + filtertag).show(); | |
- | var | + | }) |
- | + | [0].click(); | |
- | }) | + | |
- | + | ||
</script> | </script> |
Revision as of 09:34, 26 August 2014