annotate jquery-ui/development-bundle/demos/droppable/default.html @ 0:b2e4605f20b2

beta version
author dwinter
date Thu, 30 Jun 2011 09:07:49 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1 <!DOCTYPE html>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
2 <html lang="en">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
3 <head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
4 <meta charset="utf-8">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
5 <title>jQuery UI Droppable - Default functionality</title>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
7 <script src="../../jquery-1.5.1.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
8 <script src="../../ui/jquery.ui.core.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
9 <script src="../../ui/jquery.ui.widget.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
10 <script src="../../ui/jquery.ui.mouse.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
11 <script src="../../ui/jquery.ui.draggable.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
12 <script src="../../ui/jquery.ui.droppable.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
13 <link rel="stylesheet" href="../demos.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
14 <style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
15 #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
16 #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
17 </style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
18 <script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
19 $(function() {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
20 $( "#draggable" ).draggable();
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
21 $( "#droppable" ).droppable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
22 drop: function( event, ui ) {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
23 $( this )
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
24 .addClass( "ui-state-highlight" )
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
25 .find( "p" )
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
26 .html( "Dropped!" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
27 }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
28 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
29 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
30 </script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
31 </head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
32 <body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
33
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
34 <div class="demo">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
35
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
36 <div id="draggable" class="ui-widget-content">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
37 <p>Drag me to my target</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
38 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
39
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
40 <div id="droppable" class="ui-widget-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
41 <p>Drop here</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
42 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
43
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
44 </div><!-- End demo -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
45
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
46
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
47
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
48 <div class="demo-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
49 <p>Enable any DOM element to be droppable, a target for draggable elements.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
50 </div><!-- End demo-description -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
51
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
52 </body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
53 </html>