rfloat = /float/i,
rdashAlpha = /-([a-z])/ig,
rupper = /([A-Z])/g,
- rnumpx = /^\d+(?:px)?$/i,
- rnum = /^\d/,
+ rnumpx = /^-?\d+(?:px)?$/i,
+ rnum = /^-?\d/,
// cache check for defaultView.getComputedStyle
getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
});
test("css(String, Object)", function() {
- expect(20);
+ expect(21);
ok( jQuery('#nothiddendiv').is(':visible'), 'Modifying CSS display: Assert element is visible');
jQuery('#nothiddendiv').css("display", 'none');
ok( !jQuery('#nothiddendiv').is(':visible'), 'Modified CSS display: Assert element is hidden');
jQuery('#nothiddendiv').css("display", 'block');
ok( jQuery('#nothiddendiv').is(':visible'), 'Modified CSS display: Assert element is visible');
+ jQuery("#nothiddendiv").css("top", "-1em");
+ ok( jQuery("#nothiddendiv").css("top"), -16, "Check negative number in EMs." );
+
jQuery('#floatTest').css('styleFloat', 'left');
equals( jQuery('#floatTest').css('styleFloat'), 'left', 'Modified CSS float using "styleFloat": Assert float is left');
jQuery('#floatTest').css('cssFloat', 'right');