I am trying to trigger the function setupCheckBox('chk-img'); after the jQuery ui dialog is created but I cannot crack it. Any help is appreciated!
I have tried both open and create events (which I bind at the start of my code):
jQuery("#TicketTC").on( "dialogcreate", function( event, ui ) {
setupCheckBox('chk-img');
});
and
jQuery("#TicketTC").on( "dialogopen", function( event, ui ) {
setupCheckBox('chk-img');
});
My dialog code is:
jQuery("#TicketTC").dialog({
modal: true,
width: 600,
height: 'auto',
autoOpen: true,
buttons: {
CONTINUE: function() {
jQuery(this).dialog("close");
return true;
},
CANCEL: function() {
jQuery(this).dialog("close");
return false;
}
}
}).html('<div class="support-msg">' + tempHTML + '</div>');
alert("HERE!");line to thedialogcreate/openbindings and it triggers OK just prior to the dialog showing on the screen. I am trying to execute the code (essentially custom checkboxes) after the dialog opens, but both seem to trigger as it opens and as such the HTML with thecheckboxesis not yet added to the DOM so the checkBoxes code does not work.