Skip to content
Permalink
Browse files

Core: Improvements to minHeight support test. Thanks jdalton.

  • Loading branch information...
scottgonzalez committed Sep 7, 2010
1 parent 0050f23 commit 409f5d1ba0fe572e8a208a550c42aed516fc4fe3
Showing with 10 additions and 6 deletions.
  1. +10 −6 ui/jquery.ui.core.js
@@ -217,14 +217,18 @@ $.extend( $.expr[ ":" ], {

// support
$(function() {
var div = document.createElement( "div" );
div.style.minHeight = "100px";
var div = document.createElement( "div" ),
body = document.body;

document.body.appendChild( div );
$.support.minHeight = div.offsetHeight === 100;
document.body.removeChild( div ).style.display = "none";
$.extend( div.style, {
minHeight: "100px",
height: "auto",
padding: 0,
borderWidth: 0
});

div = null;
$.support.minHeight = body.appendChild( div ).offsetHeight === 100;
body.removeChild( div );
});


1 comment on commit 409f5d1

@jdalton

This comment has been minimized.

Copy link
Member

commented on 409f5d1 Sep 7, 2010

You can actually do this simpler than the method call...
div.style.cssText = 'min-height:100px;height:auto;padding:0;border-width:0';

Please sign in to comment.
You can’t perform that action at this time.