aboutsummaryrefslogtreecommitdiffstats
path: root/demos/button
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-10-03 22:37:03 +0200
committerFelix Nagel <info@felixnagel.com>2012-10-03 22:37:03 +0200
commitcca4e77a95eb7024c204f4d0719baa2ef6195ed2 (patch)
tree732a8e171647d9b25b1b2988f09dccc5d182bad7 /demos/button
parent5e12c54be1813e1f627d3214c11d7520fb46c647 (diff)
parente8bdf468614e59309b4a02ad4f6c29c1d06083c1 (diff)
downloadjquery-ui-cca4e77a95eb7024c204f4d0719baa2ef6195ed2.tar.gz
jquery-ui-cca4e77a95eb7024c204f4d0719baa2ef6195ed2.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'demos/button')
-rw-r--r--demos/button/checkbox.html13
-rw-r--r--demos/button/default.html20
-rw-r--r--demos/button/icons.html55
-rw-r--r--demos/button/index.html22
-rw-r--r--demos/button/radio.html13
-rw-r--r--demos/button/splitbutton.html33
-rw-r--r--demos/button/toolbar.html17
7 files changed, 64 insertions, 109 deletions
diff --git a/demos/button/checkbox.html b/demos/button/checkbox.html
index 05aac0af8..4d597049a 100644
--- a/demos/button/checkbox.html
+++ b/demos/button/checkbox.html
@@ -1,10 +1,10 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Checkboxes</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -21,8 +21,6 @@
</head>
<body>
-<div class="demo">
-
<input type="checkbox" id="check" /><label for="check">Toggle</label>
<div id="format">
@@ -31,14 +29,9 @@
<input type="checkbox" id="check3" /><label for="check3">U</label>
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>A checkbox is styled as a toggle button with the button widget. The label element associated with the checkbox is used for the button text.</p>
<p>This demo also demonstrates three checkboxes styled as a button set by calling <code>.buttonset()</code> on a common container.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/button/default.html b/demos/button/default.html
index 00d7d6bd2..2423aa1a2 100644
--- a/demos/button/default.html
+++ b/demos/button/default.html
@@ -1,38 +1,34 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
- $( "input[type=submit], a, button", ".demo" ).button();
- $( "a", ".demo" ).click(function() { return false; });
+ $( "input[type=submit], a, button" )
+ .button()
+ .click(function( event ) {
+ event.preventDefault();
+ });
});
</script>
</head>
<body>
-<div class="demo">
-
<button>A button element</button>
<input type="submit" value="A submit button">
<a href="#">An anchor</a>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/button/icons.html b/demos/button/icons.html
index 6d22af560..8c4bf5a30 100644
--- a/demos/button/icons.html
+++ b/demos/button/icons.html
@@ -1,56 +1,49 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Icons</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
- $( ".demo button:first" ).button({
- icons: {
- primary: "ui-icon-locked"
- },
- text: false
- }).next().button({
- icons: {
- primary: "ui-icon-locked"
- }
- }).next().button({
- icons: {
- primary: "ui-icon-gear",
- secondary: "ui-icon-triangle-1-s"
- }
- }).next().button({
- icons: {
- primary: "ui-icon-gear",
- secondary: "ui-icon-triangle-1-s"
- },
- text: false
- });
+ $( "button:first" ).button({
+ icons: {
+ primary: "ui-icon-locked"
+ },
+ text: false
+ }).next().button({
+ icons: {
+ primary: "ui-icon-locked"
+ }
+ }).next().button({
+ icons: {
+ primary: "ui-icon-gear",
+ secondary: "ui-icon-triangle-1-s"
+ }
+ }).next().button({
+ icons: {
+ primary: "ui-icon-gear",
+ secondary: "ui-icon-triangle-1-s"
+ },
+ text: false
+ });
});
</script>
</head>
<body>
-<div class="demo">
-
<button>Button with icon only</button>
<button>Button with icon on the left</button>
<button>Button with two icons</button>
<button>Button with two icons and no text</button>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/button/index.html b/demos/button/index.html
index 23977c820..79560595b 100644
--- a/demos/button/index.html
+++ b/demos/button/index.html
@@ -1,23 +1,19 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button Demos</title>
- <link rel="stylesheet" href="../demos.css">
</head>
<body>
-<div class="demos-nav">
- <h4>Examples</h4>
- <ul>
- <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
- <li><a href="radio.html">Radios</a></li>
- <li><a href="checkbox.html">Checkboxes</a></li>
- <li><a href="icons.html">Icons</a></li>
- <li><a href="toolbar.html">Toolbar</a></li>
- <li><a href="splitbutton.html">Split Button</a></li>
- </ul>
-</div>
+<ul>
+ <li><a href="default.html">Default functionality</a></li>
+ <li><a href="radio.html">Radios</a></li>
+ <li><a href="checkbox.html">Checkboxes</a></li>
+ <li><a href="icons.html">Icons</a></li>
+ <li><a href="toolbar.html">Toolbar</a></li>
+ <li><a href="splitbutton.html">Split Button</a></li>
+</ul>
</body>
</html>
diff --git a/demos/button/radio.html b/demos/button/radio.html
index 216da0935..763a50385 100644
--- a/demos/button/radio.html
+++ b/demos/button/radio.html
@@ -1,10 +1,10 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Radios</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -17,8 +17,6 @@
</head>
<body>
-<div class="demo">
-
<form>
<div id="radio">
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
@@ -27,13 +25,8 @@
</div>
</form>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>A set of three radio buttons transformed into a button set.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/button/splitbutton.html b/demos/button/splitbutton.html
index 177e7d02b..5b6493de5 100644
--- a/demos/button/splitbutton.html
+++ b/demos/button/splitbutton.html
@@ -1,10 +1,10 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Split button</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -49,30 +49,21 @@
</head>
<body>
-<div class="demo">
-
+<div>
<div>
- <div>
- <button id="rerun">Run last action</button>
- <button id="select">Select an action</button>
- </div>
- <ul>
- <li><a href="#">Open...</a></li>
- <li><a href="#">Save</a></li>
- <li><a href="#">Delete</a></li>
- </ul>
+ <button id="rerun">Run last action</button>
+ <button id="select">Select an action</button>
</div>
-
-</div><!-- End demo -->
-
-
+ <ul>
+ <li><a href="#">Open...</a></li>
+ <li><a href="#">Save</a></li>
+ <li><a href="#">Delete</a></li>
+ </ul>
+</div>
<div class="demo-description">
-
<p>An example of a split button built with two buttons: A plain button with just text, one with only a primary icon
and no text. Both are grouped together in a set.</p>
-
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/button/toolbar.html b/demos/button/toolbar.html
index c7066b21d..342ac8401 100644
--- a/demos/button/toolbar.html
+++ b/demos/button/toolbar.html
@@ -1,10 +1,10 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Button - Toolbar</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
- <script src="../../jquery-1.8.0.js"></script>
+ <script src="../../jquery-1.8.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.button.js"></script>
@@ -86,8 +86,6 @@
</head>
<body>
-<div class="demo">
-
<span id="toolbar" class="ui-widget-header ui-corner-all">
<button id="beginning">go to beginning</button>
<button id="rewind">rewind</button>
@@ -95,9 +93,9 @@
<button id="stop">stop</button>
<button id="forward">fast forward</button>
<button id="end">go to end</button>
-
+
<input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
-
+
<span id="repeat">
<input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
<input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
@@ -105,16 +103,11 @@
</span>
</span>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>
A mediaplayer toolbar. Take a look at the underlying markup: A few button elements,
an input of type checkbox for the Shuffle button, and three inputs of type radio for the Repeat options.
</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>