I'm looking to add a second dynamic_sidebar to a theme's sidebar.php that will only be displayed if the height of my main content area is greater than a certain amount. If I had some magic hybrid of jQuery and php, and I wanted this to happen if the main content area (#content) was taller than 700px I'd do something like:
if ( jQuery('#header-wrap').height() > 700 ) {
dynamic_sidebar( 'sidebar-extra' );
}
Is this possible using real phg? I know I could use jQuery hide() inside that conditional, but I'd rather not load the sidebar and mess with my layout if I didn't have to.