I have a very basic doubt...
In my wordpress blog, in my custom metabox,
This is my event handler :
jQuery('tr input.test').on('click', function( event ){
event.preventDefault();
var index = jQuery(this).closest('tr').index();
set_row_index(index);
.
.
.
});
I have a table with last column having button (input type->submit) "Edit". On adding a row dynamically, the "Edit" button of newly added row does not works.
jQuery('tr #confirm_add').on('click',function(){
event.preventDefault();
.
.
.
html += "<td> <input type=\"submit\" id=\"select\" value=\"Edit\"></td>";
.
.
.
$('#metabox_row').prepend(html);
// BIND ELEMENT HERE
});
I need to bind this event handler to the Edit button. Please help on how to achieve this