Skip to content

Instantly share code, notes, and snippets.

@dotjosh
Created March 20, 2013 01:57
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 dotjosh/5201732 to your computer and use it in GitHub Desktop.
Save dotjosh/5201732 to your computer and use it in GitHub Desktop.
(function ($) {
$.fn.fillheight = function () {
return this.each(function () {
$(this)
.height("100%")
.parent().wrapInner("<table style='height:100%;width:100%;margin:0;padding:0;border:0;'/>").end()
.siblings().wrapAll("<tr><td style='padding:0;'></td></tr>").end()
.wrap("<tr><td style='height:100%;padding:0;'></td></tr>");
});
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment