test("css(String|Hash)", function() {
expect(29);
- equals( jQuery('#main').css("display"), 'none', 'Check for css property "display"');
+ equals( jQuery('#main').css("display"), 'block', 'Check for css property "display"');
ok( jQuery('#nothiddendiv').is(':visible'), 'Modifying CSS display: Assert element is visible');
jQuery('#nothiddendiv').css({display: 'none'});
var filterVal = "progid:DXImageTransform.Microsoft.Alpha(opacity=30) progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
var filterVal2 = "progid:DXImageTransform.Microsoft.alpha(opacity=100) progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
+ var filterVal3 = "progid:DXImageTransform.Microsoft.Blur(pixelradius=5)";
jQuery('#foo').css("filter", filterVal);
equals( jQuery('#foo').css("filter"), filterVal, "css('filter', val) works" );
- jQuery('#foo').css("opacity", 1)
- equals( jQuery('#foo').css("filter"), filterVal2, "Setting opacity in IE doesn't clobber other filters" );
- equals( jQuery('#foo').css("opacity"), 1, "Setting opacity in IE with other filters works" )
+ jQuery('#foo').css("opacity", 1);
+ equals( jQuery('#foo').css("filter"), filterVal2, "Setting opacity in IE doesn't duplicate opacity filter" );
+ equals( jQuery('#foo').css("opacity"), 1, "Setting opacity in IE with other filters works" );
+ jQuery('#foo').css("filter", filterVal3).css("opacity", 1);
+ ok( jQuery('#foo').css("filter").indexOf(filterVal3) !== -1, "Setting opacity in IE doesn't clobber other filters" );
});
}
ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );
ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );
});
+
+test(":visible selector works properly on table elements (bug #4512)", function () {
+ expect(1);
+
+ jQuery('#table').html('<tr><td style="display:none">cell</td><td>cell</td></tr>');
+ equals(jQuery('#table td:visible').length, 1, "hidden cell is not perceived as visible");
+});
+
+test(":visible selector works properly on children with a hidden parent (bug #4512)", function () {
+ expect(1);
+ jQuery('#table').css('display', 'none').html('<tr><td>cell</td><td>cell</td></tr>');
+ equals(jQuery('#table td:visible').length, 0, "hidden cell children not perceived as visible");
+});
\ No newline at end of file