Testcase for jQuery Ticket 7336
css() for width/height delivers different results from other browsers
by jitter
HTML
<div id="foo" class="hide">
<div class="small" > </div>
<input class="small" type="text" />
<textarea class="small" cols="10" rows="10">foo</textarea>
</div>
<div id="bar" class="hide">
<div> </div>
<input type="text" />
<textarea cols="10" rows="10">bar</textarea>
</div>
CSS
.hide {
display: none;
}
.small {
height: 10px;
padding: 0px;
margin: 0px;
}
JavaScript
function log(e, val) {
$("body").append( "<p>" + e.parent().attr("id") + ": " + e.get(0).nodeName + " -> " + val + "</p>" );
}
$("#foo, #bar").children().each(function(i, e) {
var $e = $(e);
log($e, $e.css( 'height' ));
});