Ticket #3981: droppable.received-lost.html

File droppable.received-lost.html, 1.4 KB (added by Marc Diethelm, 13 years ago)

reduced testcase

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4    <title>Droppable loses received elements</title>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
7    <script type="text/javascript" src="http://code.jquery.com/jquery-1.3.1.js"></script>
8    <script type="text/javascript" src="http://view.jquery.com/tags/ui/testing/ui/ui.core.js"></script>
9    <script type="text/javascript" src="http://view.jquery.com/tags/ui/testing/ui/ui.droppable.js"></script>
10    <script type="text/javascript" src="http://view.jquery.com/tags/ui/testing/ui/ui.draggable.js"></script>
11    <style type="text/css">
12        div { border:1px solid black; margin-bottom: 20px; }
13        #droppable { width:100px; height:100px; }
14    </style>
15
16</head>
17
18<body>
19    #droppable
20    <div id="droppable"></div>
21
22
23    #draggables
24    <div id="draggables">
25        <div>draggable 1</div>
26        <div>draggable 2</div>
27    </div>
28
29
30    <script type="text/javascript">
31
32        $(function () {
33
34            $("#droppable").droppable({
35                drop: function(event, ui) {
36                    alert("[callback]\n\ndrop( return true )");
37                    return true;
38                }
39            });
40
41            $("#draggables div").draggable({
42                helper: "clone"
43            });
44
45        });
46
47    </script>
48
49
50</body>
51</html>