javascript - Dynamically change the height of an element to another -

here have 2 columns , b. thing column contains more content height more (in case 126px) , column b has less content remains shorter (here 94px). want make height of b = a, considering height of column might change dynamically ajax keep pace column a, height of column b must change.
<div id="a">filer text</div> | <div id="b">filler text2</div> may using jquery or js can height of element id #a , set #b problem lies when content changes dynamically.
$("#a").css("height", $("#b").css("height") ); which put in callback function of, say:
$.ajax({ ... success:function(msg){ // optimized storing off of comparision if( $("#a").height() > $("#b").height() ){ $("#b").css("height", $("#a").css("height") ); } } });
Comments
Post a Comment