i have this set of html codes that i want to append another input=”text” to increase the number of textbox as i click ‘+’ but i am not sure of the parent().parent() function. Can anyone help?
here is my jquery and html extraction, sorry they do look abit messy because of absence of css.
I think
.append()would help you adding elements and.remove()removing ’em (see example #1 and example #2).So,
element.append(content);addscontentto the end ofelementHTML (before its closing tag).element.remove();removeselementfrom wherever it was so you should use this for your ‘minus’ button with$("your_tr > td > label :last")selector (selects last of labels with inputs fromyour_tr).