Is it possible to chain adding elements to each other in jquery?
<p>Is it possible to chain together DOM manipulation code so that it adds to the prior selector?</p>

<p>I've experimented with add() andSelf() etc etc, but can't seem to get anything to work:</p>

<p>Here is a rudimentary example I've put together, with some made up jquery code...</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>And I wanted to result in:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;alex&lt;/p&gt;&lt;/li&gt;
    &lt;li&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;alex&lt;/p&gt;&lt;/li&gt;
    &lt;li&gt;&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;alex&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I'm wondering if there is a syntax similar to this (my jquery pseduo code):</p>

<pre><code>$("li").prepend("&lt;p&gt;alex&lt;/p&gt;").prepend("&lt;span&gt;Hello&lt;/span&gt;");
</code></pre>

<p>thanks for the help</p>
