Jquery dialog box - doesn't fade out before closing
- by Broken Link
I have div(box) on my page and I'm using this script to display div as dialog box. Inside that div I have a hyper link, On click of the hyper link I want to fade out the dialog box and close.. The content of the dialog fades out, but the border of the dialog box remains same. If I add $("#box").dialog('close') to the click function after fadeto there is no effect.. it just closes the dialog box completely. Any help? using jquery-ui-1.7.2
<script type="text/javascript">
$(document).ready(function(){
$("a#later").click(function () {
$("#box").fadeTo('slow', 0);
})
});
$(function () {
$("#box").dialog({
autoOpen: true,
width: 500,
modal: true,
});
});
</script>