]> source.dussan.org Git - jquery-ui.git/commitdiff
demos: added <code> inside <pre>. some other minor updates
authorRichard Worth <rdworth@gmail.com>
Wed, 31 Dec 2008 05:01:58 +0000 (05:01 +0000)
committerRichard Worth <rdworth@gmail.com>
Wed, 31 Dec 2008 05:01:58 +0000 (05:01 +0000)
14 files changed:
demos/accordion/custom_icons.html
demos/accordion/fillspace.html
demos/accordion/mouseover.html
demos/dialog/default.html
demos/slider/default.html
demos/slider/multiple_vertical.html
demos/slider/range.html
demos/slider/range_vertical.html
demos/slider/rangemax.html
demos/slider/rangemin.html
demos/slider/slider_vertical.html
demos/slider/steps.html
demos/tabs/collapsible.html
demos/tabs/mouseover.html

index 65ab3c9128aee0cb7a33a29e8b60079af509209d..3fb00167fbc5f019a8189b252f143f9c36c6bc28 100644 (file)
 
 <p>The icons used for the open and closed accordions can be any of the standard icons in the css framework or even a custom css class you create with an icon background image. For this example, we're using the arrow in a circle icons:
 
-<pre>
-icons: {
-header: "ui-icon-circle-arrow-e",
-headerSelected: "ui-icon-circle-arrow-s"}
-</pre>
+<pre><code>icons: {
+    header: "ui-icon-circle-arrow-e",
+    headerSelected: "ui-icon-circle-arrow-s"
+}
+</code></pre>
 
 </div><!-- End demo-description -->
 
index a6a896767b8dfeadfd254300a45053c696f35641..2e880dd489a8dfda2dad9d4c06214827a8e4e931 100644 (file)
@@ -75,7 +75,8 @@ Resize the outer container:
 <div class="demo-description">
 
 <p>In this example, the fillSpace option is used to make the accordion fit within a specific height and/or width. The script will automatically set the dimensions of the accordion to the height of the parent container. Try re-sizing the outer box to see the accordion fill the height of the box.</p>
-<pre>fillSpace: true</pre>
+<pre><code>fillSpace: true
+</code></pre>
 
 </div><!-- End demo-description -->
 
index c382a5158abab62f5a9894684215518f862a1804..ff3e5a6c12646a22122a4dde2ba28b6c39727573 100644 (file)
@@ -58,7 +58,9 @@
 
 <div class="demo-description">
 
-       <p>In this example, we've customized the event to have sections open on mouseover instead of on click. This is done by simply adding this option event: "mouseover" to the accordion: <pre>event: "mouseover"</pre></p>
+<p>In this example, we've customized the event to have sections open on mouseover instead of on click. This is done by simply adding this option event: "mouseover" to the accordion:</p>
+<pre><code>event: "mouseover"
+</code></pre>
 
 </div><!-- End demo-description -->
 
index de5570f5429efb933a3b52bb1fcf0a5082078060..7a8aa0deed513ede5ee3f66949fabc950f296d2f 100644 (file)
 
 <div class="demo">
 
-       <div id="dialog" title="Basic dialog">
-               <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon. </p>
-       </div>
-
-       <!-- Sample page content to illustrate the layering of the dialog -->
-       <div class="hiddenInViewSource" style="padding:20px;">
-       <p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
-       <form>
-               <input value="text input" /><br />
-               <input type="checkbox" />checkbox<br />
-               <input type="radio" />radio<br />
-               <select>
-                       <option>select</option>
-               </select><br /><br />
-               <textarea>textarea</textarea><br />
-       </form>
-       <p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
+<div id="dialog" title="Basic dialog">
+       <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
+</div>
+
+<!-- Sample page content to illustrate the layering of the dialog -->
+<div class="hiddenInViewSource" style="padding:20px;">
+<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
+<form>
+       <input value="text input" /><br />
+       <input type="checkbox" />checkbox<br />
+       <input type="radio" />radio<br />
+       <select>
+               <option>select</option>
+       </select><br /><br />
+       <textarea>textarea</textarea><br />
+</form>
+<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
 </div><!-- End sample page content -->
 
 </div><!-- End demo -->
 
+<div class="demo-description">
 
+<p>
+This is a default dialog which opens in a floating layer above the page content protected with an iframe.
+It is created by simply calling .dialog on the dialog content element, like this:
+</p>
 
-<div class="demo-description">
+<pre><code>$("#dialog").dialog();
+</code></pre>
 
-<p>This is a default dialog which opens in a floating layer above the page content protected with an iframe. It is created by simply calling .dialog on the ID of the content like this: <pre>$("#dialog").dialog();</pre></p>
-<p>A basic dialog window has a title bar and a content area. If the content length exceeds the size of the window, a scrollbar will automatically appear. The dialog window can be moved, resized and closed with the 'x' icon by default. </p>
+<p>
+A basic dialog window has a title bar and a content area.
+If the content length exceeds the maximum height (maxHeight option), a scrollbar will automatically appear.
+The dialog window can be moved, resized and closed with the 'x' icon by default.
+</p>
 
 </div><!-- End demo-description -->
 
-
 </body>
 </html>
index 8d8096a9dd46a64cec804689470da2c8b77f591d..28fd1f59b5c014710594ebd4cab1627322538a90 100644 (file)
@@ -9,9 +9,7 @@
        <script type="text/javascript" src="../../ui/ui.slider.js"></script>
        <script type="text/javascript">
        $(function() {
-               $("#slider").slider({
-                       value: 37
-               });
+               $("#slider").slider();
        });
        </script>
 </head>
 
 <div class="demo">
 
-<p>Your age:</p>
 <div id="slider"></div>
 
 </div><!-- End demo -->
 
 <div class="demo-description">
 
-<p>The default slider has a single handle and is horizontal. The handle can be moved with the mouse or by using the arrow keys and has full ARIA attributes for accessibility. The current value for the slider can be set with the value option:</p>
-<pre>value: 37</pre>
+<p>
+The default slider has a single handle and is horizontal.
+The handle can be moved with the mouse or by using the arrow keys and has full ARIA attributes for accessibility.
+</p>
 
 </div><!-- End demo-description -->
 
index 5a1913221bdfbf3595163855428486d2048fbd55..f6f263e7dc0b2b2cf4283d556ebce6bb4410e593 100644 (file)
@@ -66,6 +66,7 @@ Master volume
 <span class="ui-icon ui-icon-signal" style="float:left; margin:-2px 5px 0 0;"></span>
 Graphic EQ
 </p>
+
 <div id="slider1" style="height:120px; float:left; margin:15px"></div>
 <div id="slider2" style="height:120px; float:left; margin:15px"></div>
 <div id="slider3" style="height:120px; float:left; margin:15px"></div>
@@ -78,7 +79,9 @@ Graphic EQ
 
 <div class="demo-description" style="clear:left;">
 
-<p>This example shows how easy it is to add multiple sliders to a page, each with their own options, to make a UI for a music player.</p>
+<p>
+This example shows how easy it is to add multiple sliders to a page, each with their own options, to make a UI for a music player.
+</p>
 
 </div><!-- End demo-description -->
 
index 7f5deaf9e8b82411a455a4555e4009f4433302dc..203c14689313212fcd0e89bfdd493caa309f2005 100644 (file)
@@ -30,9 +30,8 @@
 <div class="demo-description">
 
 <p>Example of a range slider that had two drag handles and a filled bar that connects the two handles to indicate that the values between them are selected. This is created by setting the range option:</p>
-<pre>
-range: true
-</pre>
+<pre><code>range: true
+</code></pre>
 
 </div><!-- End demo-description -->
 
index 5dd634e184f53a4b716bcb6639bd75b402075ede..3cc55544d2fcaa637a78a068b41e87b175be43e0 100644 (file)
                $("#slider-range").slider({
                        orientation: "vertical",
                        range: true,
-                       values: [45, 67]
+                       values: [17, 67],
+                       slide: function(event, ui) {
+                               $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]);
+                       }
                });
+               $("#amount").val('$' + $("#slider-range").slider("values", 0) + ' - $' + $("#slider-range").slider("values", 1));
        });
        </script>
 </head>
 
 <div class="demo">
 
-<p>Target sales goal (Millions):</p>
+<p>
+<label for="amount">Target sales goal (Millions):</label>
+<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+</p>
+
 <div id="slider-range" style="height:250px;"></div>
 
 </div><!-- End demo -->
 
-
-
 <div class="demo-description">
 
-<p>This is an example of a vertical range slider created by setting the orientation to vertical:</p>
-<pre>
-orientation: "vertical",
+<p>
+This is an example of a vertical range slider created by setting the orientation to vertical:
+</p>
+
+<pre><code>orientation: "vertical",
 range: true,
 values: [17, 67]
-</pre>
-<p>It's important to note that a vertical slider needs a height set. You can do this via .height() or by setting the height through CSS. </p>
+</code></pre>
+
+<p>
+It's important to note that a vertical slider needs a height set.
+You can do this via <code>.height()</code> or by setting the height through CSS.
+</p>
+
+<p>
+This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.
+</p>
 
 </div><!-- End demo-description -->
 
index 90a80ce354d8a385b24dd6a0e5508bdd87c12fc8..d5abf5fd7608696b6f1fa01b6e843c63f2f2e251 100644 (file)
@@ -11,8 +11,8 @@
        $(function() {
                $("#slider-range-max").slider({
                        range: "max",
-                       min:1,
-                       max:10,
+                       min: 1,
+                       max: 10,
                        value: 2,
                        slide: function(event, ui) {
                                $("#amount").val(ui.value);
 
 <div class="demo">
 
-<p>Minimum number of bedrooms: <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/></p>
+<p>
+<labe for="amount">Minimum number of bedrooms:</label>
+<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+</p>
 <div id="slider-range-max"></div>
 
 </div><!-- End demo -->
 
+<div class="demo-description">
 
+<p>
+An example of a range slider that has the filled bar hard-coded to the maximum value plus a single slider.
+This makes it clear that selecting a value will also include all values above the selection.
+This is a range option type:
+</p>
 
-<div class="demo-description">
+<pre><code>range: "max"
+</code></pre>
 
-<p>An example of a range slider that has the filled bar hard-coded to the maximum value plus a single slider. This makes it clear that selecting a value will also include all values above the selection. This is a range option type:</p>
-<pre>
-range: "max",
-</pre>
-<p>This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.</p>
+<p>
+This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.
+</p>
 
 </div><!-- End demo-description -->
 
index 96b7650a8e9030edb5c102e161627bda6d336519..707f23ef73936e8d7a1dca509a14f0273f033285 100644 (file)
@@ -12,8 +12,8 @@
                $("#slider-range-min").slider({
                        range: "min",
                        value: 37,
-                       min:1,
-                       max:700,
+                       min: 1,
+                       max: 700,
                        slide: function(event, ui) {
                                $("#amount").val('$' + ui.value);
                        }
 
 <div class="demo">
 
-<p>Maximum price: <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/></p>
+<p>
+<label for="amount">Maximum price:</label>
+<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
+</p>
+
 <div id="slider-range-min"></div>
 
 </div><!-- End demo -->
 
+<div class="demo-description">
 
+<p>
+An example of a range slider that has the filled bar hard-coded to the minimum value plus a single slider.
+This makes it clear that selecting a value will also include all values below the selection.
+This is a range option type:
+</p>
 
-<div class="demo-description">
+<pre><code>range: "min"
+</code></pre>
 
-<p>An example of a range slider that has the filled bar hard-coded to the minimum value plus a single slider. This makes it clear that selecting a value will also include all values below the selection. This is a range option type:</p>
-<pre>
-range: "min",
-</pre>
-<p>This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.</p>
+<p>
+This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.
+</p>
 
 </div><!-- End demo-description -->
 
-
 </body>
 </html>
index 12763dbd5d22a0385e903699b20d4220881717d9..178d2985257361a51a7f3c9fa33b1934e192f179 100644 (file)
 </head>
 <body>
 
-
 <div class="demo">
 
-<p>Volume: <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/></p>
+<p>
+<label for="amount">Volume:</label>
+<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/>
+</p>
+
 <div id="slider-vertical" style="height:200px;"></div>
 
 </div><!-- End demo -->
 
+<div class="demo-description">
 
+<p>
+This is an example of a minimum range vertical slider created by setting the orientation to vertical:
+</p>
 
-<div class="demo-description">
+<pre><code>orientation: "vertical"
+</code></pre>
 
-<p>This is an example of a minimum range vertical slider created by setting the orientation to vertical:</p> <pre>orientation: "vertical",</pre>
-<p>It's important to note that a vertical slider needs a height set. You can do this via the script options or by adding a height through CSS. </p>
-<p>This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.</p>
+<p>
+It's important to note that a vertical slider needs a height set.
+You can do this via <code>.height()</code> or by setting the height through CSS.
+</p>
 
+<p>
+This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.
+</p>
 
 </div><!-- End demo-description -->
 
index 1e5fb91ccc632a695b2576103e85f0fc8520f608..e1e3cb9a6fe644cd0b04c3d31fd6e60c335281f4 100644 (file)
 
 <div class="demo">
 
-<p>Donation amount ($50 increments): <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/></p>
+<p>
+<label for="amount">Donation amount ($50 increments):</label>
+<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"/>
+</p>
+
 <div id="slider"></div>
 
 </div><!-- End demo -->
 
+<div class="demo-description">
+
+<p>
+This slider has a step value set that will only allow for increments of 50 to be selected.
+The default step increment is 1.
+The drag handle will snap to drop points every 50 units.
+This is set in an option called step:
+</p>
 
+<pre><code>min: 0,
+max: 500,
+step: 50
+</code></pre>
 
-<div class="demo-description">
+<p>
+This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.
+</p>
 
-<p>This slider has a step value set that will only allow for increments of 50 to be selected. The default step increment is 1. The drag handle will snap to drop points every 50 units. This is set in an option called step:</p>
-<pre>
-min: 0, max: 500, step: 50
-</pre>
-<p>This demo also shows how the current slider value can be used to populate a standard form input that can also be used for user feedback.</p>
 </div><!-- End demo-description -->
 
 </body>
index 00eb42d42648f12a5ea9585751b277faf54764a0..3b058186fa0434420b3d9632f6cb1f9502efed97 100644 (file)
 
 </div><!-- End demo -->
 
-
-
 <div class="demo-description">
 
-<p>This example allows the tab strip to be toggled closed by setting the delectable option to true like this: <pre>deselectable: true</pre></p>
-
-</div><!-- End demo-description -->
+<p>
+This example allows the tab strip to be toggled closed by setting the delectable option to true like this:
+</p>
 
+<pre><code>deselectable: true
+</code></pre>
 
+</div><!-- End demo-description -->
 
 </body>
 </html>
index 4348db932c9d119a3a6eab5602949225cfe8b422..3f87a7383ba5a757d5e1c5b153ddedddf5c0fe0a 100644 (file)
 
 </div><!-- End demo -->
 
-
-
 <div class="demo-description">
 
-<p>This example changes the default swap event from a click to mouseover by changing the event option: <pre>event: 'mouseover'</pre></p>
-
-</div><!-- End demo-description -->
+<p>
+This example changes the default swap event from a click to mouseover by changing the event option:
+</p>
 
+<pre><code>event: 'mouseover'
+</code></pre>
 
+</div><!-- End demo-description -->
 
 </body>
 </html>