1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="pl"> |
---|
3 | <head> |
---|
4 | <title>Sortable test</title> |
---|
5 | <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css" type="text/css" rel="stylesheet" media="all" /> |
---|
6 | <style type="text/css"> |
---|
7 | ul { |
---|
8 | list-style-type: none; |
---|
9 | margin: 0; |
---|
10 | padding: 0; |
---|
11 | border: 1px solid black; |
---|
12 | width: 510px; |
---|
13 | overflow: auto; |
---|
14 | } |
---|
15 | ul li { |
---|
16 | float: left; |
---|
17 | clear: left; |
---|
18 | margin: 10px 0; |
---|
19 | padding: 10px 0; |
---|
20 | width: 250px; |
---|
21 | background-color: #f0f0f0; |
---|
22 | text-indent: 10px; |
---|
23 | } |
---|
24 | </style> |
---|
25 | </head> |
---|
26 | <body> |
---|
27 | <ul> |
---|
28 | <li>sport</li> |
---|
29 | <li>koncert</li> |
---|
30 | <li>festiwale</li> |
---|
31 | <li>warszawa</li> |
---|
32 | <li>myslovitz</li> |
---|
33 | </ul> |
---|
34 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
---|
35 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> |
---|
36 | <script type="text/javascript"> |
---|
37 | $('ul').sortable({ |
---|
38 | opacity: 0.6, |
---|
39 | cursor: 'move', |
---|
40 | }).disableSelection(); |
---|
41 | |
---|
42 | $('ul li').each(function(index, value){ |
---|
43 | $(this).resizable({ |
---|
44 | maxHeight: 21, |
---|
45 | maxWidth: 500, |
---|
46 | minHeight: 21, |
---|
47 | minWidth: 100, |
---|
48 | }); |
---|
49 | }); |
---|
50 | </script> |
---|
51 | </body> |
---|
52 | </html> |
---|