Click here to Skip to main content
14,691,424 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I have a dynamic table which has 2 dynamic rows .i.e students and their subjects and marks. The code is below :

<a href="https://jsfiddle.net/soumyar/ou6sz83u/"></a>

Everything is working fine except, the serial numbers are not generated dynamically! Where could I have possibly gone wrong?

What I have tried:

function numberRows() {
      $('input[name^="SNo1"]').each(function(i) {
            $(this).val(i + 1);
      });
		}
    numberRows();
Posted
Updated 22-Feb-16 2:36am
v2

1 solution

I had called the function

numberRows();


after return statement. I updated it to call after processing return call. Like -

Click here to view
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900