Team:ETH Zurich/tpl/head/animbuttons
From 2014.igem.org
(Difference between revisions)
(18 intermediate revisions not shown) | |||
Line 4: | Line 4: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
+ | $("svg.animbutton#lasred").hide(); | ||
+ | $("svg.animbutton#luxred").hide(); | ||
+ | $("svg.animbutton#nonered").hide(); | ||
+ | $("svg.animbutton#bothred").hide(); | ||
- | + | $("img.animation").hide(); | |
+ | $("img.animation#luxblue").show(); | ||
+ | $("svg.animbutton").on("click", function(){ | ||
var filtertag = $(this).attr('id'); | var filtertag = $(this).attr('id'); | ||
- | $(" | + | $("img.animation").hide(); |
- | $(" | + | $("img.animation").filter('#' + filtertag).show(); |
+ | $('img.animation#'+filtertag).load(); | ||
}); | }); | ||
+ | |||
+ | $("text.anim").on("click", function(){ | ||
+ | var ID = $(this).attr("name"); | ||
+ | $("svg.animbutton").hide(); | ||
+ | $("svg.animbutton#none"+ID).show(); | ||
+ | $("svg.animbutton#both"+ID).show(); | ||
+ | $("svg.animbutton#lux"+ID).show(); | ||
+ | $("svg.animbutton#las"+ID).show(); | ||
+ | $("img.animation").hide(); | ||
+ | $("img.animation#none"+ID).show(); | ||
+ | $("img.animation#none"+ID).load(); | ||
+ | }); | ||
+ | |||
+ | $("polygon.anim").on("click", function(){ | ||
+ | var ID = $(this).attr("name"); | ||
+ | $("svg.animbutton").hide(); | ||
+ | $("svg.animbutton#none"+ID).show(); | ||
+ | $("svg.animbutton#both"+ID).show(); | ||
+ | $("svg.animbutton#lux"+ID).show(); | ||
+ | $("svg.animbutton#las"+ID).show(); | ||
+ | $("img.animation").hide(); | ||
+ | $("img.animation#none"+ID).show(); | ||
+ | $("img.animation#none"+ID).load(); | ||
+ | }); | ||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 16:09, 11 October 2014