diff --git a/entries/jQuery.cssHooks.xml b/entries/jQuery.cssHooks.xml index 8252bfa5..f7ecb170 100644 --- a/entries/jQuery.cssHooks.xml +++ b/entries/jQuery.cssHooks.xml @@ -163,7 +163,7 @@ if ( $.support.someCSSProp && $.support.someCSSProp !== "someCSSProp" ) })( jQuery );

Special units

-

By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object

+

By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object


 $.cssNumber.someCSSProp = true;
     
diff --git a/entries/jQuery.cssNumber.xml b/entries/jQuery.cssNumber.xml new file mode 100644 index 00000000..ce5af886 --- /dev/null +++ b/entries/jQuery.cssNumber.xml @@ -0,0 +1,33 @@ + + + jQuery.cssNumber + + 1.4.3 + + An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values. + +

You can think about jQuery.cssNumber as a list of all CSS properties you might use without a unit. It's used by .css() to determine if it needs to add px to unitless values.

+

The keys of the jQuery.cssNumber object are camel-cased and the values are all set to true. If you want to prevent the .css() method from automatically adding the px unit for a specific CSS property, you can add an extra property to the jQuery.cssNumber object.

+

+jQuery.cssNumber.someCSSProp = true;
+    
+

By default the object contains the following properties:

+ +
+ + + +