JQuery Modal Dialog how to add '-' (minimize)

this is a nice trick
1st to put the '-' in out modal title bar (this is after opening the dialog):

var header = document.getElementById("divMyDialog").previousSibling;
var minusDiv = document.createElement("div");
minusDiv.innerHTML = "  -  ";
minusDiv.setAttribute("class", "divMinusForDialog")
minusDiv.setAttribute("onclick", "MinimizeDialog()")

also put these JS functions:
function MinimizeDialog() {

function MaximizeConvDialog() {
the CSS is this with extra for out maximizer:
.divMinusForDialog {
position: absolute;
   right: 0px;
   font-size: large;

#divConvIsMinimized{   display:none;

and now just put something as maximizer:
<div id="divDialogIsMinimized" onclick="MaximizeDialogDialog()">
    <img src="Images/minimizedCall.jpg" width="100px" />



Popular posts from this blog

c# Service Play Sound with NAudio example by Moshe

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

JS/JQ simulate Enter event