function clWindow gwid var win div wid gwid console log Для окна z-ind

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function clWindow(gwid) {
var win = $("div[wid='" + gwid + "']");
console.log("Для окна с z-index: " + win.css("z-index"));
if (win.css("display") == "none") {
$(".window").css({zIndex: "999"});
win.css({
display: "block",
zIndex: 1000
});
$("img[wid=" + gwid + "]").css("opacity", "1");
console.log("Показываю..");
} else {
if (win.css("z-index") == 999) {
$(".window").css({zIndex: "999"});
win.css({zIndex: 1000});
console.log("Наверх..");
console.log("z-index: " + win.css("z-index"));
} else {
if (win.css("display") == "block") {
win.css({
display: "none",
zIndex: 999
});
$("img[wid=" + gwid + "]").css("opacity", "0.5");
console.log("Сворачиваю..");
} else {
}
}
}
}