Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active December 17, 2015 09:54
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 bjoerntx/e21d720d61091d16d295 to your computer and use it in GitHub Desktop.
Save bjoerntx/e21d720d61091d16d295 to your computer and use it in GitHub Desktop.
<script>
// re-arrange TextControl to fill browser Window
function arrangeTextControl() {
$(".editor").children().first().css("top", "50px");
$(".editor").children().first().css(
"height", window.innerHeight - 50 + "px");
}
// attached resize events and re-arrange the controls
if (window.attachEvent) {
window.attachEvent('onresize', function () {
arrangeTextControl();
});
}
else if (window.addEventListener) {
window.addEventListener('resize', function () {
arrangeTextControl();
}, true);
}
arrangeTextControl();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment