Team:Peking/js/parts.js

From 2014.igem.org

(Difference between revisions)
 
(2 intermediate revisions not shown)
Line 9: Line 9:
var h2=$("#fpartwcg2").height();
var h2=$("#fpartwcg2").height();
var h3=$("#fpartwcg3").height();
var h3=$("#fpartwcg3").height();
-
alert("1:"+h1+" 2:"+h2+" 3:"+h3);    
+
//alert("1:"+h1+" 2:"+h2+" 3:"+h3);
-
        if(h1>h3){$("#fpartwcg2").css("height",h1);$("#fpartwcg3").css("height",h1)}
+
        $("#fpartwcg2").css("height",h1);
-
        if(h3>h1){$("#fpartwcg1").css("height",h3);$("#fpartwcg2").css("height",h3)}
+
        if(h1>h3){$("#fpartwcg2").css("height",h1);$("#fpartwcg3").css("height",h1)};
-
alert("1:"+h1+" 2:"+h2+" 3:"+h3);     
+
        if(h3>h1){$("#fpartwcg1").css("height",h3);$("#fpartwcg2").css("height",h3)};
 +
//alert("1:"+h1+" 2:"+h2+" 3:"+h3);     
};
};

Latest revision as of 18:42, 17 October 2014

$(document).ready(function(){

       partsize();		

});

function partsize() {

var h1=$("#fpartwcg1").height(); var h2=$("#fpartwcg2").height(); var h3=$("#fpartwcg3").height(); //alert("1:"+h1+" 2:"+h2+" 3:"+h3); $("#fpartwcg2").css("height",h1); if(h1>h3){$("#fpartwcg2").css("height",h1);$("#fpartwcg3").css("height",h1)}; if(h3>h1){$("#fpartwcg1").css("height",h3);$("#fpartwcg2").css("height",h3)}; //alert("1:"+h1+" 2:"+h2+" 3:"+h3); };