jquery Programming Glossary: newrownum
Using JQuery to add or remove form elements http://stackoverflow.com/questions/1564566/using-jquery-to-add-or-remove-form-elements script type text javascript function start a counter for new row IDs by setting it to the number of existing rows var newRowNum 2 bind a click event to the Add link '#addnew' .click function increment the counter newRowNum 1 get the entire Add row.. of existing rows var newRowNum 2 bind a click event to the Add link '#addnew' .click function increment the counter newRowNum 1 get the entire Add row this refers to the clicked element and parent moves the selection up to the parent node in the.. set the values of the inputs in the Add row to empty strings 'input' addRow .val '' 'name' addRow .val 'os' newRowNum replace the HTML for the Add link with the new row number 'td first child' newRow .html ' input type hidden name on' newRowNum..
|