I am trying to add an onclick event button to a button tag when I load a Fancybox popup using the following code:
var processOrder = function(id) {
$('#processPopupLink').fancybox({
'hideOnContentClick': false,
'frameWidth': 850,
'frameHeight': 695
}).click();
$('#processComplete').click(function() {
alert('debug');
});
}
However, it does not show the message box, when I click the button, I have no idea why it does not work, any help would be appreciated.
EDIT
I don't want him to click a button, I want her to add onclick to an existing button in the fancybox popup when the fancybox popup opens.
source
share