blob: 763c14dad3773625fd7534e28f7e039a1462d4ce (
plain)
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
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Controlgroup - Split Button</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js" data-modules="button checkboxradio selectmenu">
$( "select" ).selectmenu({
classes: {
"ui-selectmenu-button": "ui-button-icon-only"
},
change: function(){
$( ".output" ).append( "<li>" + this.value + "</li>" );
}
});
$( ".controlgroup" ).controlgroup();
$( "button" ).click(function() {
$( ".output" ).append( "<li>Running Last Action...</li>" );
});
</script>
</head>
<body>
<div class="widget">
<h1>Split button</h1>
<div class="controlgroup">
<button>Run last option</button>
<select>
<option>Open...</option>
<option>Save</option>
<option>Delete</option>
</select>
</div>
<br/>
<h3>Output:</h3>
<ul class="output"></ul>
</div>
<div class="demo-description">
<p>A controlgroup creating a split button, by combining a button and a selectmenu. We adjust the classes option on the selectmenu to show only the icon</p>
</div>
</body>
</html>
|