<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='docs.xsl'?>
<docs>
<method cat='DOM/Manipulation' type='jQuery' short='Prepend content to the inside of every matched element.' name='prepend'>
<desc>Prepend content to the inside of every matched element.

This operation is the best way to insert elements
inside, at the beginning, of all matched elements.</desc>
<see>append(&lt;Content&gt;)</see>
<see>before(&lt;Content&gt;)</see>
<see>after(&lt;Content&gt;)</see>
<params type='&lt;Content&gt;' name='content'>
<desc>Content to prepend to the target.</desc>
</params>
<examples>
<desc>Prepends some HTML to all paragraphs.</desc>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;</before>
<code>$("p").prepend("&lt;b&gt;Hello&lt;/b&gt;");</code>
<result>&lt;p&gt;&lt;b&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
</examples>
<examples>
<desc>Prepends an Element to all paragraphs.</desc>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;</before>
<code>$("p").prepend( $("#foo")[0] );</code>
<result>&lt;p&gt;&lt;b id="foo"&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
</examples>
<examples>
<desc>Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.</desc>
<before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;</before>
<code>$("p").prepend( $("b") );</code>
<result>&lt;p&gt;&lt;b&gt;Hello&lt;/b&gt;I would like to say: &lt;/p&gt;</result>
</examples>
</method></docs>
