examples/HTML StarterKit/lib/durandal/js/plugins/dialog.js
function(theDialog) {
            $(theDialog.host).css('opacity', 0);
            $(theDialog.blockout).css('opacity', 0);

            setTimeout(function() {
                ko.removeNode(theDialog.host);
                ko.removeNode(theDialog.blockout);
            }, this.removeDelay);

            if (!dialog.isOpen()) {
                var html = $("html");
                var oldScrollTop = html.scrollTop(); // necessary for Firefox.
                html.css("overflow-y", "").scrollTop(oldScrollTop);

                if(theDialog.oldInlineMarginRight) {
                    $("body").css("margin-right", theDialog.oldBodyMarginRight);
                } else {
                    $("body").css("margin-right", '');
                }
            }
        }
function(theDialog) {
            $(theDialog.host).css('opacity', 0);
            $(theDialog.blockout).css('opacity', 0);

            setTimeout(function() {
                ko.removeNode(theDialog.host);
                ko.removeNode(theDialog.blockout);
            }, this.removeDelay);

            if (!dialog.isOpen()) {
                var html = $("html");
                var oldScrollTop = html.scrollTop(); // necessary for Firefox.
                html.css("overflow-y", "").scrollTop(oldScrollTop);

                if(theDialog.oldInlineMarginRight) {
                    $("body").css("margin-right", theDialog.oldBodyMarginRight);
                } else {
                    $("body").css("margin-right", '');
                }
            }
        }
function ( theDialog ) { $ ( theDialog . host ) . css ( 'opacity' , 0 ) ; $ ( theDialog . blockout ) . css ( 'opacity' , 0 ) ; setTimeout ( function ( ) { ko . removeNode ( theDialog . host ) ; ko . removeNode ( theDialog . blockout ) ; } , this . removeDelay ) ; if ( ! dialog . isOpen ( ) ) { var html = $ ( "html" ) ; var oldScrollTop = html . scrollTop ( ) ; // necessary for Firefox. html . css ( "overflow-y" , "" ) . scrollTop ( oldScrollTop ) ; if ( theDialog . oldInlineMarginRight ) { $ ( "body" ) . css ( "margin-right" , theDialog . oldBodyMarginRight ) ; } else { $ ( "body" ) . css ( "margin-right" , '' ) ; } } }
This function is expected to remove any DOM machinery associated with the specified dialog and do any other necessary cleanup.
@method removeHost
@param {Dialog} theDialog The dialog model.
This function is expected to remove any DOM machinery associated with the specified dialog and do any other necessary cleanup .