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>
-
selectedelements = [null, null];
 
-
curelement = 0;
 
$(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 33: Line 31:
$(this).removeClass("selected");
$(this).removeClass("selected");
$('#mw_sequencearea').children().eq($(this).parent().index()).hide();
$('#mw_sequencearea').children().eq($(this).parent().index()).hide();
-
if(selectedelements[0] == $(this))
 
-
{
 
-
curelement = 0;
 
-
} else
 
-
{
 
-
curelement = 1;
 
-
}
 
-
selectedelements[curelement] = null;
 
} else
} else
{
{
-
if(selectedelements[curelement] != null)
 
-
{
 
-
                selectedelements[curelement].removeClass("selected");
 
-
selectedelements[curelement].children().eq($(this).parent().index()).hide();
 
-
}
 
$(this).dequeue().css({opacity:1});
$(this).dequeue().css({opacity:1});
-
selectedelements[curelement] = $(this);
 
$(this).addClass("selected");
$(this).addClass("selected");
$('#mw_sequencearea').children().eq($(this).parent().index()).show();
$('#mw_sequencearea').children().eq($(this).parent().index()).show();
Line 103: Line 87:
cursor:pointer;
cursor:pointer;
color:rgba(225, 225, 225, 1);
color:rgba(225, 225, 225, 1);
-
opacity:.3;
 
background: rgba(0,0,0,.6);
background: rgba(0,0,0,.6);
border-radius:5px;
border-radius:5px;

Revision as of 20:04, 21 September 2011