Skip to content

Commit fb91d90

Browse files
committed
Effects toggle demo: Coding standards.
1 parent 1da4d7e commit fb91d90

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

demos/toggle/default.html

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
@@ -19,18 +19,33 @@
1919
<script src="../../ui/jquery.effects.slide.js"></script>
2020
<link rel="stylesheet" href="../demos.css">
2121
<style>
22-
.toggler { width: 500px; height: 200px; }
23-
#button { padding: .5em 1em; text-decoration: none; }
24-
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
25-
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
22+
.toggler {
23+
width: 500px;
24+
height: 200px;
25+
}
26+
#button {
27+
padding: .5em 1em;
28+
text-decoration: none;
29+
}
30+
#effect {
31+
position: relative;
32+
width: 240px;
33+
height: 135px;
34+
padding: 0.4em;
35+
}
36+
#effect h3 {
37+
margin: 0;
38+
padding: 0.4em;
39+
text-align: center;
40+
}
2641
</style>
2742
<script>
2843
$(function() {
2944
// run the currently selected effect
3045
function runEffect() {
31-
// get effect type from
46+
// get effect type from
3247
var selectedEffect = $( "#effectTypes" ).val();
33-
48+
3449
// most effect types need no options passed by default
3550
var options = {};
3651
// some effects have required parameters
@@ -39,11 +54,11 @@
3954
} else if ( selectedEffect === "size" ) {
4055
options = { to: { width: 200, height: 60 } };
4156
}
42-
57+
4358
// run the effect
4459
$( "#effect" ).toggle( selectedEffect, options, 500 );
4560
};
46-
61+
4762
// set effect from select menu value
4863
$( "#button" ).click(function() {
4964
runEffect();

0 commit comments

Comments
 (0)