Make WordPress Core

Ticket #23557: 23557.1.diff

File 23557.1.diff, 1.5 KB (added by sbrajesh, 12 years ago)
  • wp-content/themes/twentythirteen/js/functions.js

     
    100100                        isRTL: body.is( '.rtl' )
    101101                } );
    102102        }
     103        $(document).ready(function(){
     104       
     105             //update content hight with the tertiary sidebar to avoid overflow of sidebar
     106            if($('#tertiary').get(0)){
     107                //if we have the sidebar widget area enabled
     108                //jquery does not recommend calculating height of absolutely positioned element using height() method, so we will
     109                //calculate the height of the wrapper child
     110               //let us assume that the sidebar has the max height
     111               //we find the widget-area height and append the top offset of the sidebar from #main
     112               var max_height=$('#tertiary .sidebar-inner .widget-area').outerHeight(true)+parseFloat($('#tertiary').css('top'));
     113               //is the primary content having more height than the sidebar?
     114                if($('#primary').outerHeight(true)>max_height)
     115                    max_height=$('#primary').outerHeight(true);//if yes, let us consider it ias the max height
     116
     117               //thought we can set the
     118                $('#main').css({'min-height':max_height+'px'});
     119               // $('#tertiary').height(max_height);
     120
     121
     122            }
     123       
     124        });
     125
     126       
     127
    103128} )( jQuery );
     129 No newline at end of file