-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmp_svg.html
96 lines (87 loc) · 2.54 KB
/
tmp_svg.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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuery UI: Radiobutton- und Checkbox-Replacement</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script src="js-lib/jquery.ui.widget.js" type="text/javascript"></script>
<script src="js/ui.checkbox.js" type="text/javascript"></script>
<style type="text/css">
span.ui-helper-hidden
{
display: none;
}
span.ui-radio,
span.ui-checkbox {
position: relative;
display: inline-block;
height: 21px;
overflow: hidden;
width: 21px;
}
span.ui-radio img,
span.ui-checkbox img {
position: relative;
top: 0;
left: 0;
width: 21px;
height: 176px;
}
span.ui-checkbox-hover img {
top: -22px;
}
span.ui-checkbox-checked img {
top: -66px;
}
span.ui-checkbox-state-checked-hover img {
top: -44px;
}
span.ui-radio img {
top: -88px;
}
span.ui-radio-hover img {
top: -110px;
}
span.ui-radio-checked img {
top: -154px;
}
span.ui-radio-state-checked-hover img {
top: -132px;
}
.ui-radio-disabled, .ui-checkbox-disabled {
opacity: 0.3;
}
.ui-helper-hidden-accessible
{
position: absolute;
left: -10em;
}
</style>
<script type="text/javascript">
$(function(){
$('input').checkBox({
create: function(){
$.data(this, 'checkBox').visualElement.html('<img src="cb_rb_sprite.svg">');
}
});
});
</script>
</head>
<body>
<div id="wrapper">
<h1>jQuery UI: Radiobutton- und Checkbox-Replacement</h1>
<form action="#">
<fieldset>
<div><input id="c1" type="checkbox"/> <label for="c1">CheckBox 1</label></div>
<div><input id="c2" type="checkbox" checked="checked"/> <label for="c2">CheckBox 2</label></div>
<div><input id="c3" type="checkbox" disabled="disabled" checked="checked"/> <label for="c3">CheckBox 3</label></div>
</fieldset>
<fieldset>
<div><input name="radio" id="c4" type="radio"/> <label for="c4">Radio 1</label></div>
<div><input name="radio" id="c5" type="radio" disabled="disabled"/> <label for="c5">Radio 2</label></div>
<div><input name="radio" id="c6" type="radio"/> <label for="c6">Radio 3</label></div>
</fieldset>
</form>
</div>
</body>
</html>