I have dynamically created a button in jquery as shown below, how do i add the onclientclick attribute to it as i've done the class so when this button is added to the page, it does not cause a postback.
var btnDelete = $('<button>', {
class: "btnDeleteTaskListChild",
text: "Delete",
onclientclick: "return false;"
});
Here is a possible solution: