|
| 1 | +<?xml version="1.0"?> |
| 2 | +<entry name="buttonset" type="widget" widget-element="button set element that contains the buttons"> |
| 3 | + <title>Buttonset Widget</title> |
| 4 | + <desc>Themeable button sets.</desc> |
| 5 | + <longdesc> |
| 6 | + <div class="note"> |
| 7 | + <code>.buttonset()</code> is bundled with <code>.button()</code>. Although they are separate widgets, they are combined into a single file. If you have <code>.button()</code> available, you also have <code>.buttonset()</code> available. |
| 8 | + </div> |
| 9 | + |
| 10 | + <p>A button set provides a visual grouping for related <a href="/button/">buttons</a>. It is recommended that a button set be used whenever you have a group of related buttons. Button sets work by selecting all appropriate descendants and applying <code>.button()</code> to them. You can enable and disable a button set, which will enable and disable all contained buttons. Destroying a button set also calls each button's <code>.destroy()</code> method. For grouped radio and checkbox buttons, it's recommended to use a <code>fieldset</code> with a <code>legend</code> to provide an accessible group label.</p> |
| 11 | + |
| 12 | + <xi:include href="../includes/widget-theming.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 13 | + |
| 14 | + <ul> |
| 15 | + <li> |
| 16 | + <code>ui-buttonset</code>: The outer container of Buttonsets. |
| 17 | + </li> |
| 18 | + </ul> |
| 19 | + |
| 20 | + <h3>Dependencies</h3> |
| 21 | + <ul> |
| 22 | + <li><a href="/category/ui-core/">UI Core</a></li> |
| 23 | + <li><a href="/jQuery.widget/">Widget Factory</a></li> |
| 24 | + </ul> |
| 25 | + </longdesc> |
| 26 | + <note id="functional-css"/> |
| 27 | + <added>1.8</added> |
| 28 | + <options> |
| 29 | + <xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 30 | + <option name="items" default='"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"' example-value='"button, input[type=button], input[type=submit]"'> |
| 31 | + <desc>Which descendant elements to convert manage as buttons.</desc> |
| 32 | + <type name="Selector" /> |
| 33 | + </option> |
| 34 | + </options> |
| 35 | + <events> |
| 36 | + <xi:include href="../includes/widget-event-create.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 37 | + </events> |
| 38 | + <methods> |
| 39 | + <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 40 | + <xi:include href="../includes/widget-method-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 41 | + <xi:include href="../includes/widget-method-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 42 | + <method name="refresh"> |
| 43 | + <desc>Process any buttons that were added or removed directly in the DOM. Results depend on the <a href="#option-items"><code>items</code></a> option.</desc> |
| 44 | + </method> |
| 45 | + <xi:include href="../includes/widget-method-instance.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 46 | + <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 47 | + <xi:include href="../includes/widget-method-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/> |
| 48 | + </methods> |
| 49 | + <example> |
| 50 | + <height>100</height> |
| 51 | + <desc>A simple jQuery UI Buttonset</desc> |
| 52 | + <code><![CDATA[ |
| 53 | +$( "#radio" ).buttonset(); |
| 54 | +]]></code> |
| 55 | + <html><![CDATA[ |
| 56 | +<form> |
| 57 | + <fieldset> |
| 58 | + <legend>Favorite jQuery Project</legend> |
| 59 | + <div id="radio"> |
| 60 | + <input type="radio" id="sizzle" name="project"> |
| 61 | + <label for="sizzle">Sizzle</label> |
| 62 | +
|
| 63 | + <input type="radio" id="qunit" name="project" checked="checked"> |
| 64 | + <label for="qunit">QUnit</label> |
| 65 | +
|
| 66 | + <input type="radio" id="color" name="project"> |
| 67 | + <label for="color">Color</label> |
| 68 | + </div> |
| 69 | + </fieldset> |
| 70 | +</form> |
| 71 | +]]></html> |
| 72 | + </example> |
| 73 | + <category slug="widgets"/> |
| 74 | +</entry> |
0 commit comments