aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/selectmenu/custom_render.html5
-rw-r--r--tests/visual/selectmenu/compatibility.html1
-rw-r--r--tests/visual/selectmenu/empty.html73
3 files changed, 76 insertions, 3 deletions
diff --git a/demos/selectmenu/custom_render.html b/demos/selectmenu/custom_render.html
index 39d1534de..c9f962d7f 100644
--- a/demos/selectmenu/custom_render.html
+++ b/demos/selectmenu/custom_render.html
@@ -21,11 +21,10 @@
li.addClass( 'ui-state-disabled' ).text( item.label );
} else {
el = item.element;
- var link = $( "<a />", {
+ $( "<a />", {
html: icon = '<span style="' + el.attr("style") + '" class="ui-icon ' + el.attr("class") + '"></span>' + item.label,
href: '#'
- });
- li.append( link );
+ }).appendTo( li );
}
return li.appendTo( ul );
diff --git a/tests/visual/selectmenu/compatibility.html b/tests/visual/selectmenu/compatibility.html
index bd00804f3..66a2ba072 100644
--- a/tests/visual/selectmenu/compatibility.html
+++ b/tests/visual/selectmenu/compatibility.html
@@ -50,6 +50,7 @@
});
</script>
<style>
+ .demo { width: 400px }
form { margin: 20px 0 0 0 }
fieldset { border: 0; }
label { display: block; }
diff --git a/tests/visual/selectmenu/empty.html b/tests/visual/selectmenu/empty.html
new file mode 100644
index 000000000..f4702c2c2
--- /dev/null
+++ b/tests/visual/selectmenu/empty.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Selectmenu - Methids functionality</title>
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.7.1.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.menu.js"></script>
+ <script src="../../../ui/jquery.ui.selectmenu.js"></script>
+ <link rel="stylesheet" href="../../../demos/demos.css">
+ <script>
+ $(function() {
+ $('select').selectmenu();
+ });
+ </script>
+ <style>
+ form { margin: 20px 0 0 0 }
+ fieldset { border: 0; }
+ label { display: block; }
+ select { width: 200px; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+<form action="#">
+ <fieldset>
+ <label for="speed">Select a speed:</label>
+ <select name="speed" id="speed"></select>
+
+ <label for="speed2">Select a speed:</label>
+ <select name="speed2" id="speed">
+ <option value=""></option>
+ </select>
+ <br />
+ <br />
+ <br />
+ <label for="number">Select a number:</label>
+ <select name="number" id="number">
+ <option value="1">1</option>
+ <option value="2" selected="selected">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value=""></option>
+ <option value="6">6</option>
+ <option value="7">7</option>
+ <option value=""></option>
+ <option value="9">9</option>
+ </select>
+ <br />
+ <br />
+ <br />
+ <label for="files">Select a file:</label>
+ <select name="files" id="files">
+ <optgroup label="Scripts"></optgroup>
+ <optgroup label="Other files">
+ <option value="somefile">Some unknown file</option>
+ <option value="someotherfile">Some other file</option>
+ </optgroup>
+ </select>
+ </fieldset>
+</form>
+
+</div><!-- End demo -->
+
+
+
+</body>
+</html>