I have the following code:
$(document).ready(function() {
$("#popupClose").click(function(){
disablePopup();
});
$(document).keypress(function(e){
if(e.keyCode==27) {
disablePopup();
}
});
});
And it works now (finally) to get the popup loaded before the document is finished (the popup is needed to steer the flow of the PHP in the file). However, since these functions are only created within document.ready, my controls of the popup are not yet available when my script is calling the popup.
Help appreciated!