/JQueryMobile/assets/demos/1.2.0/docs/forms/radiobuttons/methods.html

https://github.com/unidevel/android · HTML · 108 lines · 82 code · 26 blank · 0 comment · 0 complexity · 42fcdae91ecd12cc50b3416d47caf31b MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQuery Mobile Docs - Radio buttons</title>
  7. <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile-1.2.0.css" />
  8. <link rel="stylesheet" href="../../jqm/css/jqm-docs.css"/>
  9. <script src="../../js/jquery-1.7.1.min.js"></script>
  10. <script src="../../jqm/js/jqm-docs.js"></script>
  11. <script src="../../../js/jquery.mobile-1.2.0.js"></script>
  12. </head>
  13. <body>
  14. <div data-role="page" class="type-interior">
  15. <div data-role="header" data-theme="f">
  16. <h1>Radio buttons</h1>
  17. <a href="../../../index.html" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
  18. <a href="../../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
  19. </div><!-- /header -->
  20. <div data-role="content">
  21. <div class="content-primary">
  22. <form action="methods.html#" method="get">
  23. <h2>Radio buttons</h2>
  24. <ul data-role="controlgroup" data-type="horizontal" class="localnav">
  25. <li><a href="index.html" data-role="button" data-transition="fade">Basics</a></li>
  26. <li><a href="options.html" data-role="button" data-transition="fade">Options</a></li>
  27. <li><a href="methods.html" data-role="button" data-transition="fade" class="ui-btn-active">Methods</a></li>
  28. <li><a href="events.html" data-role="button" data-transition="fade">Events</a></li>
  29. </ul>
  30. <p>The radio button has the following methods:</p>
  31. <dl>
  32. <dt><code>enable</code> enable a disabled radio button</dt>
  33. <dd>
  34. <pre><code>
  35. $("input[type='radio']").checkboxradio('enable');
  36. </code></pre>
  37. </dd>
  38. <dt><code>disable</code> disable a radio button</dt>
  39. <dd>
  40. <pre><code>
  41. $("input[type='radio']").checkboxradio('disable');
  42. </code></pre>
  43. </dd>
  44. <dt><code>refresh</code> update the radio button</dt>
  45. <dd>
  46. If you manipulate a radio button via JavaScript, you must call the refresh method on it to update the visual styling.
  47. <pre><code>
  48. $("input[type='radio']:first").attr("checked",true).checkboxradio("refresh");
  49. </code></pre>
  50. </dd>
  51. </dl>
  52. </form>
  53. </div><!--/content-primary -->
  54. <div class="content-secondary">
  55. <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
  56. <h3>More in this section</h3>
  57. <ul data-role="listview" data-theme="c" data-dividertheme="d">
  58. <li data-role="list-divider">Form elements</li>
  59. <li><a href="../docs-forms.html">Form basics</a></li>
  60. <li><a href="../forms-all.html">Form element gallery</a></li>
  61. <li><a href="../forms-all-mini.html">Mini form element gallery</a></li>
  62. <li><a href="../textinputs/index.html">Text inputs</a></li>
  63. <li><a href="../search/index.html">Search input</a></li>
  64. <li><a href="../slider/index.html">Slider</a></li>
  65. <li><a href="../switch/index.html">Flip toggle switch</a></li>
  66. <li data-theme="a"><a href="index.html">Radio buttons</a></li>
  67. <li><a href="../checkboxes/index.html">Checkboxes</a></li>
  68. <li><a href="../selects/index.html">Select menus</a></li>
  69. <li><a href="../forms-themes.html">Theming forms</a></li>
  70. <li><a href="../forms-all-native.html">Native form elements</a></li>
  71. <li><a href="../forms-sample.html">Submitting forms</a></li>
  72. </ul>
  73. </div>
  74. </div>
  75. </div><!-- /content -->
  76. <div data-role="footer" class="footer-docs" data-theme="c">
  77. <p class="jqm-version"></p>
  78. <p>&copy; 2012 jQuery Foundation and other contributors</p>
  79. </div>
  80. </div><!-- /page -->
  81. </body>
  82. </html>