-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
138 lines (125 loc) · 3.17 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<title>Jquery Window Manager Example</title>
<link rel=StyleSheet href="jquery-wm/main.css" type="text/css" media=screen>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src=jquery-wm/main.js></script>
<style type=text/css>
html, body {
width: 100%;
height: 100%;
position: relative;
margin: 0;
background-color: #ccc;
}
h3 {
color: #242;
}
pre,textarea {
border: 1px solid #ddd;
background-color: #eee;
overflow: auto;
color: #000099;
}
textarea {
width: 90%;
height: 200px;
padding: 2%;
}
h3 { margin-bottom: 4px; }
p,pre { margin: 0; padding: 6px; }
p {
font-size: smaller;
color: #222;
}
button {
font-weight: bold;
}
#page {
max-width: 600px;
padding: 20px;
margin: auto;
margin-top: 1em;
border: 2px outset #aaa;
background-color: white;
border-radius: 10px;
}
</style>
<script>
$(function(){
$('#tryit').click(function(){
$('head').append('<style type=text/css>'+$(this).prev().val()+'<\/style>');
$().WM('open');
});
});
</script>
</head>
<body>
<div id=page>
<h1>jquery-wm - child windows in your web browser</h1>
<h3>Download at github</h3>
<p><a href=https://github.com/collinsp/jquery-wm>https://github.com/collinsp/jquery-wm</a>
<h3>Examples</h3>
<p>Click me to open a blank window. <button type=button onclick="var w = $().WM('open'); w.find('.windowcontent').html('some html content here');">new window</button>
<p>Click me to open a mini window <button type=button onclick="var w = $().WM('open', 'https://www.alltrails.com/'); w.addClass('autohide');">new window</button>
<p>
Here's some anchors links that have a class=jquery-wm attribute. These will open up in child windows.
<a href=https://reddit.com class=jquery-wm>https://www.alltrails.com/</a>,
<a href=index.html class=jquery-wm>clone this page</a>
<p>
Open child windows using jquery object.
<pre>
var $w = $().WM('open','http://retrogames.com');
// other jquery extensions that can be used on children windows
$w.WM('maximize');
$w.WM('minimize');
$w.WM('raise');
$w.WM('close');
// open a window and manipulate the window content
var $w = $().WM('open');
$w.find('.titlebartext').text('foo');
$w.find('.windowcontent').html('here is some content');
</pre>
<h3>Stylize with CSS</h3>
<p>
<textarea>
.window {
background-color: purple;
border-width: 4px;
border-color: yellow;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
filter: alpha(opacity=20);
opacity: .2;
}
.windowtitlebar {
background-color: black;
color: green;
}
.window.focused {
background-color: purple;
border-width: 8px;
border-color: green;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
filter: alpha(opacity=90);
opacity: .9;
}
.window.focused .windowtitlebar {
background-color: orange;
color: red;
text-decoration: blink;
}
.window.focused .windowcontent {
background-color: white;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
.window .horizbuts * {
background-color: yellow;
}
</textarea>
<button type=button id=tryit>try it</button>
</div>
</body>
</html>