forked from jquery/api.jquery.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery.cssNumber.xml
More file actions
18 lines (18 loc) · 1.28 KB
/
jQuery.cssNumber.xml
File metadata and controls
18 lines (18 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0"?>
<entry type="property" name="jQuery.cssNumber" return="Object" removed="4.0">
<title>jQuery.cssNumber</title>
<signature>
<added>1.4.3</added>
</signature>
<desc>An object containing all CSS properties that may be used without a unit. Prior to jQuery 4.0, the <a href="/css/"><code>.css()</code></a> method uses this object to see if it may append <code>px</code> to unitless values.</desc>
<longdesc>
<p>You can think about <code>jQuery.cssNumber</code> as a list of all CSS properties you might use without a unit. Prior to jQuery 4.0, it was used by <a href="/css/"><code>.css()</code></a> to determine if it needs to add <code>px</code> to unitless values.</p>
<p>The keys of the <code>jQuery.cssNumber</code> object are camel-cased and the values are all set to <code>true</code>. If you want to prevent the <a href="/css/"><code>.css()</code></a> method from automatically adding the <code>px</code> unit for a specific CSS property and that property is not yet a key of the <code>jQuery.cssNumber</code> object, you can add such an extra property:</p>
<pre><code>
jQuery.cssNumber.someCSSProp = true;
</code></pre>
</longdesc>
<category slug="css"/>
<category slug="manipulation/style-properties"/>
<category slug="version/1.4.3"/>
</entry>