aboutsummaryrefslogtreecommitdiffstats
path: root/demos/droppable/propagation.html
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-09-10 09:38:42 -0400
committerScott González <scott.gonzalez@gmail.com>2010-09-10 09:38:42 -0400
commita1fc59c17e40b89c28920681cd6dd32ed68a4102 (patch)
tree3c1ddd977d1524775f48eef1b361d085b04bf7eb /demos/droppable/propagation.html
parent6cf45dd25a98f98c91a4000345fc5597f9929939 (diff)
downloadjquery-ui-a1fc59c17e40b89c28920681cd6dd32ed68a4102.tar.gz
jquery-ui-a1fc59c17e40b89c28920681cd6dd32ed68a4102.zip
Droppable demos: Coding standards.
Diffstat (limited to 'demos/droppable/propagation.html')
-rw-r--r--demos/droppable/propagation.html58
1 files changed, 32 insertions, 26 deletions
diff --git a/demos/droppable/propagation.html b/demos/droppable/propagation.html
index e6cf3c212..d39c13101 100644
--- a/demos/droppable/propagation.html
+++ b/demos/droppable/propagation.html
@@ -1,48 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Droppable - Prevent propagation</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../ui/jquery.ui.droppable.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
#draggable { width: 100px; height: 40px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable, #droppable2 { width: 230px; height: 120px; padding: 0.5em; float: left; margin: 10px; }
#droppable-inner, #droppable2-inner { width: 170px; height: 60px; padding: 0.5em; float: left; margin: 10px; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
+ $( "#draggable" ).draggable();
- $("#draggable").draggable();
-
- $("#droppable, #droppable-inner").droppable({
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('> p').html('Dropped!');
+ $( "#droppable, #droppable-inner" ).droppable({
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "> p" )
+ .html( "Dropped!" );
return false;
}
});
- $("#droppable2, #droppable2-inner").droppable({
+ $( "#droppable2, #droppable2-inner" ).droppable({
greedy: true,
- activeClass: 'ui-state-hover',
- hoverClass: 'ui-state-active',
- drop: function(event, ui) {
- $(this).addClass('ui-state-highlight').find('> p').html('Dropped!');
+ activeClass: "ui-state-hover",
+ hoverClass: "ui-state-active",
+ drop: function( event, ui ) {
+ $( this )
+ .addClass( "ui-state-highlight" )
+ .find( "> p" )
+ .html( "Dropped!" );
}
});
-
});
</script>
</head>
<body>
+
<div class="demo">
<div id="draggable" class="ui-widget-content">
@@ -65,10 +70,11 @@
</div><!-- End demo -->
-<div class="demo-description">
-<p>When working with nested droppables &#8212; for example, you may have an editable directory structure displayed as a tree, with folder and document nodes &#8212; the <code>greedy</code> option set to true prevents event propagation when a draggable is dropped on a child node (droppable).</p>
+<div class="demo-description">
+<p>When working with nested droppables &#8212; for example, you may have an editable directory structure displayed as a tree, with folder and document nodes &#8212; the <code>greedy</code> option set to true prevents event propagation when a draggable is dropped on a child node (droppable).</p>
</div><!-- End demo-description -->
+
</body>
</html>