Team:ETH Zurich/tpl/head/animbuttons
From 2014.igem.org
(Difference between revisions)
(10 intermediate revisions not shown) | |||
Line 10: | Line 10: | ||
$("img.animation").hide(); | $("img.animation").hide(); | ||
- | $("img.animation# | + | $("img.animation#luxblue").show(); |
- | + | $("svg.animbutton").on("click", function(){ | |
var filtertag = $(this).attr('id'); | var filtertag = $(this).attr('id'); | ||
$("img.animation").hide(); | $("img.animation").hide(); | ||
$("img.animation").filter('#' + filtertag).show(); | $("img.animation").filter('#' + filtertag).show(); | ||
+ | $('img.animation#'+filtertag).load(); | ||
}); | }); | ||
$("text.anim").on("click", function(){ | $("text.anim").on("click", function(){ | ||
var ID = $(this).attr("name"); | 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(){ | $("polygon.anim").on("click", function(){ | ||
- | var ID = $(this | + | 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(); | ||
}); | }); | ||
}); | }); |
Latest revision as of 16:09, 11 October 2014