diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-10-13 15:23:42 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-10-13 15:23:42 -0400 |
commit | bb41a258a84413b1fa2fda1a17a9ed86fd9d83e9 (patch) | |
tree | dedd68ac032e61877521d8c8fa8f205537444f81 /demos/sortable/items.html | |
parent | a829697d0c9083438bde3a2e47964c29bfbc9417 (diff) | |
download | jquery-ui-bb41a258a84413b1fa2fda1a17a9ed86fd9d83e9.tar.gz jquery-ui-bb41a258a84413b1fa2fda1a17a9ed86fd9d83e9.zip |
Sortable demos: Coding standards.
Diffstat (limited to 'demos/sortable/items.html')
-rw-r--r-- | demos/sortable/items.html | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/demos/sortable/items.html b/demos/sortable/items.html index 3f1cbb6c3..e04138372 100644 --- a/demos/sortable/items.html +++ b/demos/sortable/items.html @@ -1,30 +1,30 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8" /> + <meta charset="utf-8"> <title>jQuery UI Sortable - Include / exclude items</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.sortable.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.sortable.js"></script> + <link rel="stylesheet" href="../demos.css"> + <style> #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; zoom: 1; } #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 3px; width: 90%; } </style> - <script type="text/javascript"> + <script> $(function() { - $("#sortable1").sortable({ - items: 'li:not(.ui-state-disabled)' + $( "#sortable1" ).sortable({ + items: "li:not(.ui-state-disabled)" }); - $("#sortable2").sortable({ - cancel: '.ui-state-disabled' + $( "#sortable2" ).sortable({ + cancel: ".ui-state-disabled" }); - $("#sortable1 li, #sortable2 li").disableSelection(); + $( "#sortable1 li, #sortable2 li" ).disableSelection(); }); </script> </head> @@ -51,20 +51,19 @@ </div><!-- End demo --> -<div class="demo-description"> + +<div class="demo-description"> <p> Specify which items are eligible to sort by passing a jQuery selector into the <code>items</code> option. Items excluded from this option are not sortable, nor are they valid targets for sortable items. </p> - <p> To only prevent sorting on certain items, pass a jQuery selector into the <code>cancel</code> option. Cancelled items remain valid sort targets for others. </p> - </div><!-- End demo-description --> </body> |