0
|
1 <!DOCTYPE html>
|
|
2 <html lang="en">
|
|
3 <head>
|
|
4 <meta charset="utf-8">
|
|
5 <title>jQuery UI Selectable - Display as grid</title>
|
|
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
|
7 <script src="../../jquery-1.5.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.selectable.js"></script>
|
|
12 <link rel="stylesheet" href="../demos.css">
|
|
13
|
|
14 <style>
|
|
15 #feedback { font-size: 1.4em; }
|
|
16 #selectable .ui-selecting { background: #FECA40; }
|
|
17 #selectable .ui-selected { background: #F39814; color: white; }
|
|
18 #selectable { list-style-type: none; margin: 0; padding: 0; }
|
|
19 #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
|
|
20 </style>
|
|
21 <script>
|
|
22 $(function() {
|
|
23 $( "#selectable" ).selectable();
|
|
24 });
|
|
25 </script>
|
|
26 </head>
|
|
27 <body>
|
|
28
|
|
29 <div class="demo">
|
|
30
|
|
31 <ol id="selectable">
|
|
32 <li class="ui-state-default">1</li>
|
|
33 <li class="ui-state-default">2</li>
|
|
34 <li class="ui-state-default">3</li>
|
|
35 <li class="ui-state-default">4</li>
|
|
36 <li class="ui-state-default">5</li>
|
|
37 <li class="ui-state-default">6</li>
|
|
38 <li class="ui-state-default">7</li>
|
|
39 <li class="ui-state-default">8</li>
|
|
40 <li class="ui-state-default">9</li>
|
|
41 <li class="ui-state-default">10</li>
|
|
42 <li class="ui-state-default">11</li>
|
|
43 <li class="ui-state-default">12</li>
|
|
44 </ol>
|
|
45
|
|
46 </div><!-- End demo -->
|
|
47
|
|
48
|
|
49
|
|
50 <div class="demo-description">
|
|
51 <p>To arrange selectable items as a grid, give them identical dimensions and float them using CSS.</p>
|
|
52 </div><!-- End demo-description -->
|
|
53
|
|
54 </body>
|
|
55 </html>
|