aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-06-30 22:53:45 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-07-21 11:00:42 -0400
commit0e8d871a264139d5156d924f0925033c483f0c1e (patch)
treee4955366eaffca8573516229c98b5bd0469323fc
parent91ee61e78043581fcf5fbcfe105603b6279d3724 (diff)
downloadjquery-ui-0e8d871a264139d5156d924f0925033c483f0c1e.tar.gz
jquery-ui-0e8d871a264139d5156d924f0925033c483f0c1e.zip
Selectmenu: Update demos to use AMD
Ref #10119
-rw-r--r--demos/selectmenu/custom_render.html11
-rw-r--r--demos/selectmenu/default.html33
-rw-r--r--demos/selectmenu/product-selection.html45
3 files changed, 34 insertions, 55 deletions
diff --git a/demos/selectmenu/custom_render.html b/demos/selectmenu/custom_render.html
index ec0b4b6d5..b77aaf663 100644
--- a/demos/selectmenu/custom_render.html
+++ b/demos/selectmenu/custom_render.html
@@ -5,15 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Selectmenu - Custom Rendering</title>
<link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/position.js"></script>
- <script src="../../ui/menu.js"></script>
- <script src="../../ui/selectmenu.js"></script>
<link rel="stylesheet" href="../demos.css">
- <script>
- $(function() {
+ <script src="../../external/requirejs/require.js"></script>
+ <script src="../bootstrap.js">
$.widget( "custom.iconselectmenu", $.ui.selectmenu, {
_renderItem: function( ul, item ) {
var li = $( "<li>" ),
@@ -47,7 +41,6 @@
.iconselectmenu()
.iconselectmenu( "menuWidget")
.addClass( "ui-menu-icons avatar" );
- });
</script>
<style>
h2 {
diff --git a/demos/selectmenu/default.html b/demos/selectmenu/default.html
index 5fa1af28b..e8bb1a6a7 100644
--- a/demos/selectmenu/default.html
+++ b/demos/selectmenu/default.html
@@ -5,27 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Selectmenu - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/position.js"></script>
- <script src="../../ui/menu.js"></script>
- <script src="../../ui/selectmenu.js"></script>
<link rel="stylesheet" href="../demos.css">
- <script>
- $(function() {
- $( "#speed" ).selectmenu();
-
- $( "#files" ).selectmenu();
-
- $( "#number" )
- .selectmenu()
- .selectmenu( "menuWidget" )
- .addClass( "overflow" );
-
- $( "#salutation" ).selectmenu();
- });
- </script>
<style>
fieldset {
border: 0;
@@ -38,6 +18,19 @@
height: 200px;
}
</style>
+ <script src="../../external/requirejs/require.js"></script>
+ <script src="../bootstrap.js">
+ $( "#speed" ).selectmenu();
+
+ $( "#files" ).selectmenu();
+
+ $( "#number" )
+ .selectmenu()
+ .selectmenu( "menuWidget" )
+ .addClass( "overflow" );
+
+ $( "#salutation" ).selectmenu();
+ </script>
</head>
<body>
diff --git a/demos/selectmenu/product-selection.html b/demos/selectmenu/product-selection.html
index e759ea36a..a6f1a2203 100644
--- a/demos/selectmenu/product-selection.html
+++ b/demos/selectmenu/product-selection.html
@@ -5,33 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Selectmenu - Product Selection</title>
<link rel="stylesheet" href="../../themes/base/all.css">
- <script src="../../external/jquery/jquery.js"></script>
- <script src="../../ui/core.js"></script>
- <script src="../../ui/widget.js"></script>
- <script src="../../ui/position.js"></script>
- <script src="../../ui/menu.js"></script>
- <script src="../../ui/selectmenu.js"></script>
<link rel="stylesheet" href="../demos.css">
- <script>
- $(function() {
- var circle = $( "#circle" );
-
- $( "#radius" ).selectmenu({
- change: function( event, data ) {
- circle.css({
- width: data.item.value,
- height: data.item.value
- });
- }
- });
-
- $( "#color" ).selectmenu({
- change: function( event, data ) {
- circle.css( "background", data.item.value );
- }
- });
- });
- </script>
<style>
fieldset {
border: 0;
@@ -50,6 +24,25 @@
height: 150px;
}
</style>
+ <script src="../../external/requirejs/require.js"></script>
+ <script src="../bootstrap.js">
+ var circle = $( "#circle" );
+
+ $( "#radius" ).selectmenu({
+ change: function( event, data ) {
+ circle.css({
+ width: data.item.value,
+ height: data.item.value
+ });
+ }
+ });
+
+ $( "#color" ).selectmenu({
+ change: function( event, data ) {
+ circle.css( "background", data.item.value );
+ }
+ });
+ </script>
</head>
<body>