简体   繁体   中英

Append row when clicking corresponding add button

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.

See it in action here

Screenshot

http://img28.imageshack.us/img28/5499/immwa.png

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM