Skip to content

Commit e299e9a

Browse files
committed
Selectmenu: added empty.html visual test, small improvements in html files
1 parent 156d0fb commit e299e9a

File tree

3 files changed

+76
-3
lines changed

3 files changed

+76
-3
lines changed

demos/selectmenu/custom_render.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
li.addClass( 'ui-state-disabled' ).text( item.label );
2222
} else {
2323
el = item.element;
24-
var link = $( "<a />", {
24+
$( "<a />", {
2525
html: icon = '<span style="' + el.attr("style") + '" class="ui-icon ' + el.attr("class") + '"></span>' + item.label,
2626
href: '#'
27-
});
28-
li.append( link );
27+
}).appendTo( li );
2928
}
3029

3130
return li.appendTo( ul );

tests/visual/selectmenu/compatibility.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
});
5151
</script>
5252
<style>
53+
.demo { width: 400px }
5354
form { margin: 20px 0 0 0 }
5455
fieldset { border: 0; }
5556
label { display: block; }

tests/visual/selectmenu/empty.html

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>jQuery UI Selectmenu - Methids functionality</title>
6+
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
7+
<script src="../../../jquery-1.7.1.js"></script>
8+
<script src="../../../ui/jquery.ui.core.js"></script>
9+
<script src="../../../ui/jquery.ui.widget.js"></script>
10+
<script src="../../../ui/jquery.ui.position.js"></script>
11+
<script src="../../../ui/jquery.ui.menu.js"></script>
12+
<script src="../../../ui/jquery.ui.selectmenu.js"></script>
13+
<link rel="stylesheet" href="../../../demos/demos.css">
14+
<script>
15+
$(function() {
16+
$('select').selectmenu();
17+
});
18+
</script>
19+
<style>
20+
form { margin: 20px 0 0 0 }
21+
fieldset { border: 0; }
22+
label { display: block; }
23+
select { width: 200px; }
24+
</style>
25+
</head>
26+
<body>
27+
28+
<div class="demo">
29+
30+
<form action="#">
31+
<fieldset>
32+
<label for="speed">Select a speed:</label>
33+
<select name="speed" id="speed"></select>
34+
35+
<label for="speed2">Select a speed:</label>
36+
<select name="speed2" id="speed">
37+
<option value=""></option>
38+
</select>
39+
<br />
40+
<br />
41+
<br />
42+
<label for="number">Select a number:</label>
43+
<select name="number" id="number">
44+
<option value="1">1</option>
45+
<option value="2" selected="selected">2</option>
46+
<option value="3">3</option>
47+
<option value="4">4</option>
48+
<option value=""></option>
49+
<option value="6">6</option>
50+
<option value="7">7</option>
51+
<option value=""></option>
52+
<option value="9">9</option>
53+
</select>
54+
<br />
55+
<br />
56+
<br />
57+
<label for="files">Select a file:</label>
58+
<select name="files" id="files">
59+
<optgroup label="Scripts"></optgroup>
60+
<optgroup label="Other files">
61+
<option value="somefile">Some unknown file</option>
62+
<option value="someotherfile">Some other file</option>
63+
</optgroup>
64+
</select>
65+
</fieldset>
66+
</form>
67+
68+
</div><!-- End demo -->
69+
70+
71+
72+
</body>
73+
</html>

0 commit comments

Comments
 (0)