title: How to prepend a consecutive sequence number to every paragraph using jQuery?
body: <p>In my UI, I have a button and some paragraphs. The requirement is to prepend consecutive sequence numbers to every paragraph on clicking of the button.</p>
  
  <p>I tried it this way. But it did not work.</p>
  
  <pre><code>var count=0;
  $("#buttonGparano").click(function(){
  jQuery.each($("#col2 p").not(".append").prepend(++count));
  });
  });
  </code></pre>
  
  <p>On 1st click, it is prepending '1' to every paragraph, then on 2nd click, it is prepending '2' and so on.
  I want that when I click once, the 1st para should have sequence no. 1, 2nd paragraph should have sequence no. 2 and so on.</p>
  
  <p>The paragraphs are written like this:</p>
  
  <pre><code>&lt;div id="col2"&gt;
  &lt;p class="firstparagraph"&gt;
  Lorem ipsum sit amet, consecte elit, sed diam nonummy nibh euismod &lt;em&gt;tincidunt&lt;/em&gt; ut laoreet dolore magna aliquam erat &lt;/p&gt;
  &lt;p class="secondparagraph"&gt;
  Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse &lt;strong&gt;molestie&lt;/strong&gt; consequat, vel illum eu feugiat nulla facilisis at vero eros et accumsan et iusto odio&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My code should first find how many paragraphs are there totally, and assign them consecutive value. I mean to say the code should work for any number of paragraphs.
  Please suggest something if anyone has any idea.</p>