<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='docs.xsl'?>
<docs>
<method cat='CSS' type='String' short='Get the current computed, pixel, width of the first matched element.' name='width'>
<desc>Get the current computed, pixel, width of the first matched element.</desc>
<examples>
<code>$("p").width();</code>
<result>300</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method><method cat='CSS' type='jQuery' short='Set the CSS width of every matched element.' name='width'>
<desc>Set the CSS width of every matched element. If no explicit unit
was specified (like 'em' or '%') then "px" is added to the width.</desc>
<params type='String|Number' name='val'>
<desc>Set the CSS property to the specified value.</desc>
</params>
<examples>
<code>$("p").width(20);</code>
<result>&lt;p style="width:20px;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
<examples>
<code>$("p").width("20em");</code>
<result>&lt;p style="width:20em;"&gt;This is just a test.&lt;/p&gt;</result>
<before>&lt;p&gt;This is just a test.&lt;/p&gt;</before>
</examples>
</method></docs>
