-1

Updated:

I have the situation like, Having 3 column layout Column A, Column B, Column C. Column A height will be dynamic one. I need to set Column A height for both Column B and C .

For example, Column A has tabbed panel which is having height based on tab content. I have the issue with monitoring Column A height for Column B and C. I am thinking of using setTimeOut Method to monitor Column A height. Is there best way to do ?

Code:

 setTimeout(set_height,1);
function set_height(){
cmn_height = $('.column-a').height();
$(".column-b").css('height',cmn_height);
$(".column-c").css('height',cmn_height);
cmn_height=0;
}

Kindly advice

mymotherland
  • 7,968
  • 14
  • 65
  • 122
  • If you are using jQuery (judging by the tag), perhaps this might help http://stackoverflow.com/questions/172821/detecting-when-a-divs-height-changes-using-jquery – Tuanderful Oct 06 '12 at 10:02
  • Why are not using this on on page load and why are you using setTimeout? – Vijay Verma Oct 06 '12 at 11:02

1 Answers1

0

Please try this:

setInterval("set_height()",1000);

function set_height(){
    cmn_height = $('.column-a').height();
    $(".column-b").css('height',cmn_height);
    $(".column-c").css('height',cmn_height);
    cmn_height=0;
}
suresh gopal
  • 3,138
  • 6
  • 27
  • 58