Skip to content

Instantly share code, notes, and snippets.

@watagashi
Created October 30, 2010 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watagashi/655552 to your computer and use it in GitHub Desktop.
Save watagashi/655552 to your computer and use it in GitHub Desktop.
function setFstHeight(h, force) {
if (!h)
h = $("fst").value.length ? Math.max($("fst").scrollHeight+2,min_fst_height) : min_fst_height;
if (no_resize_fst && !force) return;
var exh = (navigator.userAgent.indexOf("MSIE 8") >= 0 ? 1 : 0), opt = $("option").clientHeight;
$("fst").style.height = h;
var twh = (window.innerHeight || document.documentElement.clientHeight)-$("control").offsetHeight-2;
$("tw").style.height = $("re").style.height = $("tw2").style.height =
twh > 0 ? twh : 0;
}
#control,#fst,#option,#menu,.tw { position: static; }
.tw { overflow-y: scroll; }
body { overflow:hidden; min-height: 53px; }
#tw2 { min-height: 0px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment