I'm writing an input button with the following code:
$("#QnA").append("<input type='button' name='questionSub' value='Save'/>");
What I would like to do it capture the click function of that new button. This is what I attempted:
$('input[name=questionSub]').click(function () {
alert('hi');
});
This isn't working for me. Any ideas?