views:

33

answers:

3

I want to set both #map_canvas and #content's height, but this doesn't seem to work:

$(['#map_canvas','#content']).css("height", ($(window).height()-270 + "px"));

Does anybody know how to do this?

A: 

Try (you kinda have extra parentesis in there):

$(['#map_canvas','#content']).css("height", $(window).height()-270 + "px");

robertbasic
+1  A: 

Try this:

$('#map_canvas, #content').height(window.height-270);

I do something similar with google earth integration on a current project...

Fosco
A: 
jQuery("#map_canvas,#content").css("height", (jQuery(window).height() - 270 ) + "px");
Amit