views:

53

answers:

2

Hey all - I have a fixed size div with another div inside that holds Flash at 100%. I need to change the height of the fixed div on the fly. This works in Safari, but not on FF or any Windows browsers

<div  id="center1200"> 
  <div id="content">

 </div>
</div>

and I call with jQuery

$("#center1200").height(1000); 
A: 
$("#center1200").get(0).style.height = "1000px";
David
And what does this do that `$("#center1200").height(1000);` isn't already doing?
Gert G
It uses the browsers DOM API instead of the black box jquery height method. The docs for the jquery height method indicate the "get" for height() gets the computed height, but the "set" is setting the element height (inner height). For this reason I would not use the jquery height() method for setting as its get/set values aren't interchangeable.
David
Regardless of the differences between set and get, `$(element).height(1000)` does the same exact thing as `element.style.height = '1000px'`. Try it.
MooGoo
A: 

thanks all - putting the code inside the $(document).ready(function() { ... }) along with resizing the child div did the trick. THanks!

toli