Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Equal height of the blocks
- function setEqualHeight(blocks, etalon, correction){
- blocks = $(blocks);
- if ( blocks.length > 1 ) {
- var tallest = 0;
- blocks.each(function(){
- var height = $(this).outerHeight(true);
- if (tallest < height) tallest = height;
- });
- if (etalon && tallest < etalon) {
- result = etalon;
- } else {
- result = tallest;
- }
- if (correction) result = result + correction;
- blocks.height(result);
- }
- }
- setEqualHeight('#tabbed .box');
- setEqualHeight('.report-inn', $('#tabbed').outerHeight(true), -50);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement