Skip to content

Commit 0351763

Browse files
committed
Selectable demos: coding standards.
1 parent 6b6e1d7 commit 0351763

File tree

4 files changed

+52
-46
lines changed

4 files changed

+52
-46
lines changed

demos/selectable/default.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="utf-8">
55
<title>jQuery UI Selectable - Default functionality</title>
6-
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7-
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
8-
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
10-
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
11-
<script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
12-
<link type="text/css" href="../demos.css" rel="stylesheet" />
6+
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7+
<script src="../../jquery-1.4.2.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">
1313

14-
<style type="text/css">
14+
<style>
1515
#feedback { font-size: 1.4em; }
1616
#selectable .ui-selecting { background: #FECA40; }
1717
#selectable .ui-selected { background: #F39814; color: white; }
1818
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
1919
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
2020
</style>
21-
<script type="text/javascript">
21+
<script>
2222
$(function() {
23-
$("#selectable").selectable();
23+
$( "#selectable" ).selectable();
2424
});
2525
</script>
2626
</head>
2727
<body>
28+
2829
<div class="demo">
2930

3031
<ol id="selectable">
@@ -39,10 +40,11 @@
3940

4041
</div><!-- End demo -->
4142

42-
<div class="demo-description">
4343

44-
<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
4544

45+
<div class="demo-description">
46+
<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
4647
</div><!-- End demo-description -->
48+
4749
</body>
4850
</html>

demos/selectable/display-grid.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="utf-8">
55
<title>jQuery UI Selectable - Display as grid</title>
6-
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7-
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
8-
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
10-
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
11-
<script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
12-
<link type="text/css" href="../demos.css" rel="stylesheet" />
6+
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7+
<script src="../../jquery-1.4.2.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">
1313

14-
<style type="text/css">
14+
<style>
1515
#feedback { font-size: 1.4em; }
1616
#selectable .ui-selecting { background: #FECA40; }
1717
#selectable .ui-selected { background: #F39814; color: white; }
1818
#selectable { list-style-type: none; margin: 0; padding: 0; }
1919
#selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
2020
</style>
21-
<script type="text/javascript">
21+
<script>
2222
$(function() {
23-
$("#selectable").selectable();
23+
$( "#selectable" ).selectable();
2424
});
2525
</script>
2626
</head>
2727
<body>
28+
2829
<div class="demo">
2930

3031
<ol id="selectable">
@@ -44,10 +45,11 @@
4445

4546
</div><!-- End demo -->
4647

47-
<div class="demo-description">
4848

49-
<p>To arrange selectable items as a grid, give them identical dimensions and float them using CSS.</p>
5049

50+
<div class="demo-description">
51+
<p>To arrange selectable items as a grid, give them identical dimensions and float them using CSS.</p>
5152
</div><!-- End demo-description -->
53+
5254
</body>
5355
</html>

demos/selectable/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="utf-8">
55
<title>jQuery UI Selectable Demos</title>
6-
<link type="text/css" href="../demos.css" rel="stylesheet" />
6+
<link rel="stylesheet" href="../demos.css">
77
</head>
88
<body>
99

demos/selectable/serialize.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="utf-8">
55
<title>jQuery UI Selectable - Serialize</title>
6-
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
7-
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
8-
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
9-
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
10-
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
11-
<script type="text/javascript" src="../../ui/jquery.ui.selectable.js"></script>
12-
<link type="text/css" href="../demos.css" rel="stylesheet" />
6+
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7+
<script src="../../jquery-1.4.2.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">
1313

14-
<style type="text/css">
14+
<style>
1515
#feedback { font-size: 1.4em; }
1616
#selectable .ui-selecting { background: #FECA40; }
1717
#selectable .ui-selected { background: #F39814; color: white; }
1818
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
1919
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
2020
</style>
21-
<script type="text/javascript">
21+
<script>
2222
$(function() {
23-
$("#selectable").selectable({
24-
stop: function(){
25-
var result = $("#select-result").empty();
26-
$(".ui-selected", this).each(function(){
27-
var index = $("#selectable li").index(this);
28-
result.append(" #" + (index + 1));
23+
$( "#selectable" ).selectable({
24+
stop: function() {
25+
var result = $( "#select-result" ).empty();
26+
$( ".ui-selected", this ).each(function() {
27+
var index = $( "#selectable li" ).index( this );
28+
result.append( " #" + ( index + 1 ) );
2929
});
3030
}
3131
});
3232
});
3333
</script>
3434
</head>
3535
<body>
36+
3637
<div class="demo">
3738

3839
<p id="feedback">
@@ -50,10 +51,11 @@
5051

5152
</div><!-- End demo -->
5253

53-
<div class="demo-description">
5454

55-
<p>Write a function that fires on the <code>stop</code> event to collect the index values of selected items. Present values as feedback, or pass as a data string.</p>
5655

56+
<div class="demo-description">
57+
<p>Write a function that fires on the <code>stop</code> event to collect the index values of selected items. Present values as feedback, or pass as a data string.</p>
5758
</div><!-- End demo-description -->
59+
5860
</body>
5961
</html>

0 commit comments

Comments
 (0)