SimpleModal, How to close pop up window with animation
- by bhsstudio
Hi, I am very new to jQuery. I have a questino about the SimpleModal.
I am trying to close the pop up window with animation effect, but failed.
Here is my code.
$('#btnClose').click(function(e) {
// Closing animations
$("#content").modal({ onClose: function(dialog) {
dialog.data.fadeOut('slow', function() {
dialog.container.hide('slow', function() {
dialog.overlay.slideUp('slow', function() {
$.modal.close();
});
});
});
}
});
});
<div id="content" style="display: none;">
<h1>Basic Modal Dialog</h1>
<a href='#' id="btnCloset">Close</a>
</div>
When I click on the "Close" link, nothing happens. Any help please? Thank you very much!