Template:Team:UC Davis/MutantWidget

From 2011.igem.org

(Difference between revisions)
Line 2: Line 2:
<script src='https://2011.igem.org/Template:Team:UC_Davis/jquery.flot.min.js?action=raw'></script>
<script src='https://2011.igem.org/Template:Team:UC_Davis/jquery.flot.min.js?action=raw'></script>
<script>
<script>
 +
mutantcolors = ["black", "red", "orange", "yellow", "green", "blue", "indigo", "violet"];
$(document).ready(function(){
$(document).ready(function(){
     //Convert the ul to a table for some reason.
     //Convert the ul to a table for some reason.
Line 13: Line 14:
if(!$(this).hasClass("selected"))
if(!$(this).hasClass("selected"))
{
{
-
$(this).dequeue().animate({"opacity":1}, 500);
+
$(this).dequeue().animate({"opacity":1, "color":mutantcolors[$(this).parent().index()]}, 500);
}
}
});
});
Line 20: Line 21:
if(!$(this).hasClass("selected"))
if(!$(this).hasClass("selected"))
{
{
-
$(this).dequeue().animate({"opacity":.3}, 500);
+
$(this).dequeue().animate({"opacity":.3, "color":"rgba(225, 225, 225, 1)"}, 500);
}
}

Revision as of 20:19, 21 September 2011