aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-21 10:08:28 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-21 10:08:28 -0400
commitfb91d90058175d6b38622393283603737b86e849 (patch)
treeb48c07a19b7c46fb0fac36925f80a12416e6a956 /demos
parent1da4d7e18d9a4393ab49b3e603278247af614a2b (diff)
downloadjquery-ui-fb91d90058175d6b38622393283603737b86e849.tar.gz
jquery-ui-fb91d90058175d6b38622393283603737b86e849.zip
Effects toggle demo: Coding standards.
Diffstat (limited to 'demos')
-rw-r--r--demos/toggle/default.html33
1 files changed, 24 insertions, 9 deletions
diff --git a/demos/toggle/default.html b/demos/toggle/default.html
index 469674b70..5dcd5eff8 100644
--- a/demos/toggle/default.html
+++ b/demos/toggle/default.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -19,18 +19,33 @@
<script src="../../ui/jquery.effects.slide.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
- .toggler { width: 500px; height: 200px; }
- #button { padding: .5em 1em; text-decoration: none; }
- #effect { width: 240px; height: 135px; padding: 0.4em; position: relative; }
- #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
+ .toggler {
+ width: 500px;
+ height: 200px;
+ }
+ #button {
+ padding: .5em 1em;
+ text-decoration: none;
+ }
+ #effect {
+ position: relative;
+ width: 240px;
+ height: 135px;
+ padding: 0.4em;
+ }
+ #effect h3 {
+ margin: 0;
+ padding: 0.4em;
+ text-align: center;
+ }
</style>
<script>
$(function() {
// run the currently selected effect
function runEffect() {
- // get effect type from
+ // get effect type from
var selectedEffect = $( "#effectTypes" ).val();
-
+
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
@@ -39,11 +54,11 @@
} else if ( selectedEffect === "size" ) {
options = { to: { width: 200, height: 60 } };
}
-
+
// run the effect
$( "#effect" ).toggle( selectedEffect, options, 500 );
};
-
+
// set effect from select menu value
$( "#button" ).click(function() {
runEffect();