append li in ul which contain multiple spaces
<p>I want to append <code>&lt;li&gt;</code> in <code>&lt;ul&gt;</code> using jQuery. I've done it successfully with the following line:</p>

<pre><code>var ChosedItem = $("#chosedItem");
ChosedItem.append('&lt;li id=' + $(this).attr('id') + ' limit=' + $(this).attr('limit') + ' &gt;&lt;span&gt;' + $(this).children(0) + '&lt;/span&gt;&lt;/li&gt;');
</code></pre>

<p>in this, <code>#chosedItem</code> is the div id where the <code>&lt;ul&gt;</code> exists</p>

<p>But the problem in my case is if my <code>&lt;li&gt;</code> items contain spaces then it is not added after <code>[0]th</code> position of children because I am using <code>chlidren(0)</code>. What can I use in place of <code>children(0)</code> to add <code>&lt;li&gt;</code> items that contain multiple spaces?</p>
