-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
111 lines (96 loc) · 4.48 KB
/
example.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
<!DOCTYPE html>
<html>
<head>
<title>Windomize plugin dev</title>
<link rel="shortcut icon" type="image/ico" href="resources/img/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="style/jquery.windomize.css"/>
<link rel="stylesheet" type="text/css" href="style/example.css"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.windomize.js"></script>
<script type="text/javascript">
$(function () {
$('#test1').click(function() {
$(".window").windomize({
removeTitle: true,
draggable: true,
resizable: true,
duration: 200,
autoFocus: true,
autoSwitchFocus: true,
draggableOptions: { addClasses: false },
resizableOptions: { disabled: true },
title: "",
appendTitleBar: true
});
});
// var w = $("#div1").windomize();
// $("#div2").windomize().toggleContent($("#div1"));
// $("#div1").windomize();
$('#test2').click(function() {
$('#div1').windomize('toggleContent');
$('#div2').windomize('toggleContent');
$('#div2').windomize('focusOn');
// $("#test").windomize('toggleContent');
// $(".window").windomize('toggleContent').windomize('focusOn');
// $(".window").windomize('focusOn');
});
$('#test3').click(function() {
$('#div2').css('width','').css('height','').css('top', '').css('left', '');
$('#div1').windomize('destroy');//.switchClass('window', 'normal');
$('#div2').windomize('destroy');//.switchClass('window', 'normal');
});
// $('#div1').windomize({removeTitle: true});
});
</script>
</head>
<body>
<div id="test1" title="windomize" style="width:25px;height:25px;background-color: green; margin-top: 3px;"></div>
<div id="test2" title="toggle content" style="width:25px;height:25px;background-color: orange; margin-top: 3px;"></div>
<div id="test3" title="destroy" style="width:25px;height:25px;background-color: red; margin-top: 3px;"></div>
<div id="div1" class="window" title="Write your title here">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<a href="http://www.google.com" target="_blank">TEST</a>
<a href="#">TESTing</a>
</p>
</div>
<div id="div2" class="window" title="Another title here">
<div class="scroll">
<img src="http://dribbble.com/images/ball-46.png?1333977957">
<h1>Heading</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<h1>Another heading</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</div>
</body>
</html>