SimpleModal, How to close pop up window with animation

Posted by bhsstudio on Stack Overflow See other posts from Stack Overflow or by bhsstudio
Published on 2010-06-08T04:35:42Z Indexed on 2010/06/08 4:42 UTC
Read the original article Hit count: 406

Filed under:
|

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!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about simplemodal