Team:Peking/js/parts.js

From 2014.igem.org

(Difference between revisions)
Line 5: Line 5:
function partsize()
function partsize()
{
{
-
 
+
var h1=$("#fpartwcg1").height();
var h1=$("#fpartwcg1").height();
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)}
-
// var w=$("#mid1right").width();
+
        if(h3>h1){$("#fpartwcg1").css("height",h3);$("#fpartwcg2").css("height",h3)}
};
};

Revision as of 16:56, 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); if(h1>h3){$("#fpartwcg2").css("height",h1);$("#fpartwcg3").css("height",h1)} if(h3>h1){$("#fpartwcg1").css("height",h3);$("#fpartwcg2").css("height",h3)} };