Here almost we have completed the functionality.When we clicking on add button of each row will create a new table in a row.Here the problem is while clicking the first main add button its appending to next row of the second main row.
It should come in order while clicking the corresponding row means the sub table row should come.
try: in addEvent function
e.innerHTML = '<button onClick="addSubRow('+row+',this);">Add</button>';
in addSubRow function:
$(html).insertAfter($(self).parent().parent())
example: in action
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.