How to get Child element value separated by comma in jquery
<p>I have a list </p>

<pre><code>&lt;ul class='class-name'&gt;
  &lt;li&gt;&lt;p&gt;value1&lt;/p&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;p&gt;value2&lt;/p&gt;&lt;/li&gt;
  &lt;li&gt;&lt;p&gt;value3&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I want to get value1,value2,value3 for that i am using </p>

<pre><code>$('ul.class-name &gt; li &gt; p').text();
</code></pre>

<p>But i am getting value1value2value3</p>

<p>can any one tell me how to get comma separated value.</p>
