5 <title>jQuery UI Droppable - Accept</title>
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7 <script src="../../jquery-1.9.1.js"></script>
8 <script src="../../ui/jquery.ui.core.js"></script>
9 <script src="../../ui/jquery.ui.widget.js"></script>
10 <script src="../../ui/jquery.ui.mouse.js"></script>
11 <script src="../../ui/jquery.ui.draggable.js"></script>
12 <script src="../../ui/jquery.ui.droppable.js"></script>
13 <link rel="stylesheet" href="../demos.css">
15 #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
16 #draggable, #draggable-nonvalid { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
20 $( "#draggable, #draggable-nonvalid" ).draggable();
21 $( "#droppable" ).droppable({
23 activeClass: "ui-state-hover",
24 hoverClass: "ui-state-active",
25 drop: function( event, ui ) {
27 .addClass( "ui-state-highlight" )
37 <div id="draggable-nonvalid" class="ui-widget-content">
38 <p>I'm draggable but can't be dropped</p>
41 <div id="draggable" class="ui-widget-content">
42 <p>Drag me to my target</p>
45 <div id="droppable" class="ui-widget-header">
46 <p>accept: '#draggable'</p>
49 <div class="demo-description">
50 <p>Specify using the <code>accept</code> option which element (or group of elements) is accepted by the target droppable.</p>