Ticket #3666: draggable_sortable.test.html

File draggable_sortable.test.html, 1.5 KB (added by Marc Diethelm, 11 years ago)

Testcase

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5    <title>Drag into Sortable Testcase</title>
6
7        <link rel="stylesheet" href="http://view.jquery.com/tags/ui/testing/themes/base/ui.core.css" type="text/css" />
8        <link rel="stylesheet" href="http://view.jquery.com/tags/ui/testing/themes/base/ui.all.css" type="text/css" />
9
10    <script type="text/javascript" src="http://code.jquery.com/jquery-1.3.1.js"></script>
11    <script type="text/javascript" src="http://view.jquery.com/tags/ui/testing/ui/jquery.ui.all.js"></script>
12
13    <style type="text/css" media="screen">
14        #sort { width:100px; height:100px; border:1px solid #ccc; }
15        div div { margin: 2px;  border:1px solid #ccc; }
16    </style>
17
18</head>
19<body>
20
21    Draggable ( connectToSortable:['#sort'] )...
22    <div class="drag1">
23        <div>1</div>
24        <div>2</div>
25        <div>3</div>
26        <div>4</div>
27    </div>
28
29    draggable ( connectToSortable:'#sort' )...
30    <div class="drag2">
31        <div>1</div>
32        <div>2</div>
33        <div>3</div>
34        <div>4</div>
35    </div>
36
37    sortable
38    <div id="sort">
39    </div>
40
41    <script type="text/javascript">
42        jQuery('.drag1 > div').draggable({helper:'clone',connectToSortable:['#sort']});
43        jQuery('.drag2 > div').draggable({helper:'clone',connectToSortable:'#sort'});
44        jQuery('#sort').sortable();
45    </script>
46</body>
47</html>