How to display count of child record in parent using Javascript or JQuery
<p>In the example below:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="some.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;

//???
//???

);

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr id="parent_1"&gt;
&lt;td&gt;Parent 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="child"&gt;
&lt;td&gt;Child 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="child"&gt;
&lt;td&gt;Child 2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="parent_2"&gt;
&lt;td&gt;Parent2&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I wanted "Parent 1" text to change to "Parent 1(2)" where '2'  is the number of childs for the given parent using Java script or Jquery. How is this possible?</p>

<p>I'm new to JQuery and Java script. </p>

<p>Please let me know.</p>
