Skip to content

Commit

Permalink
Core: Improvements to minHeight support test. Thanks jdalton.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Sep 7, 2010
1 parent 0050f23 commit 409f5d1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ui/jquery.ui.core.js
Expand Up @@ -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 );
});


Expand Down

1 comment on commit 409f5d1

@jdalton
Copy link
Member

@jdalton jdalton commented on 409f5d1 Sep 7, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.