Hidden div element content is removed after first modal popup display.
Using the below handler function, the modal displays the hidden div just fine, then after clearing the modal, a subsequent call to the below handler function returns an alert that the "Target does not exist", and the hidden dive element is in fact gone.
function OnSubmitHandler() {
if (e = $('modalcontainer')) {
SqueezeBox.initialize({
size : {x : 300, y : 120}
});
SqueezeBox.open(e, {
handler : 'adopt',
overlayOpacity : 0.7,
onOpen : function(){
e.style.display = 'block';
},
onClose : function(){
e.style.display = 'none';
}
});
}else{
alert('Target does not exist');
}
}
This should be simple and the handler function works fine as written, but the hidden div content is gone after the first display. Having trouble figuring out why. I must be missing something.