Team:ETH Zurich/labblog/buttons
From 2014.igem.org
(Difference between revisions)
Line 6: | Line 6: | ||
$("article").show(); | $("article").show(); | ||
$("rect").on("click", function(){ | $("rect").on("click", function(){ | ||
+ | var filtertag = $(this).attr('class'); | ||
+ | $("article").hide().filter('.' + filtertag).show(); | ||
+ | }); | ||
+ | |||
+ | $("article").show(); | ||
+ | $("text").on("click", function(){ | ||
var filtertag = $(this).attr('class'); | var filtertag = $(this).attr('class'); | ||
$("article").hide().filter('.' + filtertag).show(); | $("article").hide().filter('.' + filtertag).show(); |
Revision as of 15:16, 27 August 2014