tags:

views:

40

answers:

1

What's wrong with the code?

$('<tr><td><input type="button" value="No" /></td></tr>')
.appendTo('table')
.find('input[type=text]')
.select()
.end()
.find("input[type='text'][value='No']")
.click(function() {$(this).parents('tr').remove();})
+2  A: 

You're selecting type=text at your selectors. Change them to type=button.

$('<tr><td><input type="button" value="No" /></td></tr>')
.appendTo('table')
.find('input[type=button]')
.select()
.end()
.find("input[type='button'][value='No']")
.click(function() {$(this).parents('tr').remove();})
Canavar
he's appending that to a table, so it may actually exists
yoda
No,it's typo....