-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
104 lines (101 loc) · 6.85 KB
/
index.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<link rel="stylesheet" href="css/jquery.customWindow.css" type="text/css"/>
<style>
html, body {
margin: 0px;
padding: 0px;
height: 100%;
overflow: hidden;
}
</style>
<style>
.code {
border: 1px solid #CC0000;
background: #FFFFCC;
padding: 10px;
width: 40%;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
</style>
<script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<script type="text/javascript" src="js/jquery.customWindow.js"></script>
<script type="text/javascript">
$(function(){
var i = 1;
var win = $.customWindow({
title: 'Finestra ' + i,
onopen: function (cont, obj) {
cont.html($('#testo').html());
},
onclose: function () {
alert('close -' + i);
},
onresize: function (obj) {
alert(obj.container.attr('id'));
}
});
$('a.openWin').each(function () {
$(this).bind('click', function (e) {
i++;
$.customWindow({
title: 'Finestra ' + i
});
});
});
});
</script>
</head>
<body>
<div id="testo" style="height: 100%; overflow: auto;">
<p><a href="javascript: void(0);" class="openWin">Open an other window</a>
</p>
<p><strong>Code</strong>: </p>
<p class="code"><link rel="stylesheet" href="<strong>css/jquery.customWindow.css</strong>" type="text/css"/></p>
<p class="code">// recomended<br />
<style><br />
html, body {<br />
margin: 0px;<br />
padding: 0px;<br />
height: 100%;<br />
overflow: hidden;<br />
}<br />
</style><br />
</p>
<p class="code">// corner is optional<br />
<script type="text/javascript" src="<strong>js/jquery.corner.js</strong>"></script><br />
<script type="text/javascript" src="<strong>js/jquery.customWindow.js</strong>"></script></p>
<p class="code"><script type="text/javascript"><br />
$(function(){<br />
var i = 1;<br />
var win = $.customWindow({<br />
title: 'Finestra ' + i,<br />
onopen: function (cont, obj) {<br />
cont.html($('#testo').html());<br />
},<br />
onclose: function () { <br />
alert('close -' + i); <br />
},<br />
onresize: function (obj) {<br />
alert(obj.container.attr('id'));<br />
}<br />
});<br />
<br />
$('a.openWin').each(function () {<br />
$(this).bind('click', function (e) { <br />
i++; <br />
$.customWindow({<br />
title: 'Finestra ' + i<br />
}); <br />
});<br />
});<br />
});<br />
</script></p>
</div>
</body>
</html>