-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjqueryUI-test.html
73 lines (65 loc) · 1.35 KB
/
jqueryUI-test.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
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<style type="text/css">
body {
margin:0;
padding:0;
}
div {
position:absolute;
width:500px;
height:128px;
border:1px solid black;
padding:10px;
padding-left:148px;
}
#container {
position:absolute;
margin:0;
padding:0;
border:none;
}
img {
float:left;
display:block;
margin:0;
}
button {
position:absolute;
}
</style>
<script type="text/javascript">
$(function() {
$("#container").width(window.innerWidth);
$("#container").height(window.innerHeight);
var $div = $('<div/>')
.appendTo(document.body)
.position({
my:"left bottom",
at:"left+20 bottom-50",
of:$("#container")
})
.css("background","url(images/obama.png) 10px 10px no-repeat");
var $text = $('<span/>').appendTo($div).text("blar blaaa blaaa");
var $button = $('<button/>')
.button({
label:"plop"
})
.appendTo($div)
.position({
my:"right bottom",
at:"right bottom",
of:$div
});
});
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>