]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Update demos to use AMD
authorAlexander Schmitz <arschmitz@gmail.com>
Tue, 30 Jun 2015 23:01:59 +0000 (19:01 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Tue, 21 Jul 2015 15:00:41 +0000 (11:00 -0400)
Ref #10119

demos/position/cycler.html
demos/position/default.html

index f7e0b13024a2d08fda58b486f5bd0a3089287324..af0c00a829220f17aeb9a15ed99ef8a77a457e87 100644 (file)
@@ -4,10 +4,6 @@
        <meta charset="utf-8">
        <title>jQuery UI Position - Image Cycler</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>
        <link rel="stylesheet" href="../demos.css">
        <style>
        body {
@@ -23,8 +19,8 @@
                position: absolute;
        }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js">
                function left( element, using ) {
                        element.position({
                                my: "right middle",
@@ -83,7 +79,6 @@
                        center( $( "img:eq(1)" ), animate );
                        right( $( "img:eq(2)" ), animate );
                });
-       });
        </script>
 </head>
 <body>
index 284653c9646cbb348815fe9d3bd293288c2e72dd..1427879804c96bbb57f242a1e3d451a54d2cf770 100644 (file)
@@ -4,12 +4,6 @@
        <meta charset="utf-8">
        <title>jQuery UI Position - 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/mouse.js"></script>
-       <script src="../../ui/draggable.js"></script>
-       <script src="../../ui/position.js"></script>
        <link rel="stylesheet" href="../demos.css">
        <style>
        #parent {
@@ -41,8 +35,8 @@
                margin-left: 15px;
        }
        </style>
-       <script>
-       $(function() {
+       <script src="../../external/requirejs/require.js"></script>
+       <script src="../bootstrap.js" data-modules="draggable">
                function position() {
                        $( ".positionable" ).position({
                                of: $( "#parent" ),
@@ -61,7 +55,6 @@
                });
 
                position();
-       });
        </script>
 </head>
 <body>