/** JQuery plugin til at lave samme højde på DIV tags Usage: $("#LeftPane, #ContentPane, #RightPane").makeSameHeight(); Licens: GPL **/ (function($) { $.fn.makeSameHeight = function(){ var defheight = 500; /* default height */ var div = this.css("height", "auto").each(function(){ defheight = Math.max(defheight, this.offsetHeight); /* Set default height to max */ if(typeof(_TOOLBOX_ENABLED) != 'undefined') { if (_TOOLBOX_ENABLED == "YES") defheight += 60; } }); div.css("height", defheight).each(function() { var oh = this.offsetHeight; if (oh > defheight) { $(this).css("height", defheight - (oh-defheight)); }; }); }; })(jQuery); $(document).ready(function(){ $("#LeftPane, #ContentPane, #ContentPane_nomenu, #ContentPane_noright,#frontpage-table, #RightPane").makeSameHeight(); });