PageRenderTime 88ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/demos/checkboxradio-checkbox/index.php

https://github.com/lialex100/jquery-mobile
PHP | 149 lines | 122 code | 27 blank | 0 comment | 2 complexity | aa2832d37621b46701abfcf9dd746fa3 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>Checkbox - jQuery Mobile Demos</title>
  7. <link rel="shortcut icon" href="../favicon.ico">
  8. <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
  9. <link rel="stylesheet" href="../../css/themes/default/jquery.mobile.css">
  10. <link rel="stylesheet" href="../_assets/css/jqm-demos.css">
  11. <script src="../../external/jquery/jquery.js"></script>
  12. <script src="../_assets/js/"></script>
  13. <script src="../../js/"></script>
  14. </head>
  15. <body>
  16. <div data-role="page" class="jqm-demos" data-quicklinks="true">
  17. <div data-role="toolbar" data-type="header" class="jqm-header">
  18. <h2><a href="../" title="jQuery Mobile Demos home"><img src="../_assets/img/jquerymobile-logo.png" alt="jQuery Mobile"></a></h2>
  19. <a href="#" class="jqm-navmenu-link ui-button ui-button-icon-only ui-corner-all ui-nodisc-icon ui-alt-icon ui-toolbar-header-button-left">Menu<span class="ui-icon ui-icon-bars"></span></a>
  20. <a href="#" class="jqm-search-link ui-button ui-button-icon-only ui-corner-all ui-nodisc-icon ui-alt-icon ui-toolbar-header-button-right">Search<span class="ui-icon ui-icon-search"></span></a>
  21. <div class="jqm-banner"><h3>Version <span class="jqm-version"></span> Demos</h3></div>
  22. </div><!-- /header -->
  23. <div role="main" class="ui-content jqm-content">
  24. <h1>Checkbox</h1>
  25. <a href="http://api.jquerymobile.com/checkboxradio/" class="jqm-api-docs-link ui-nodisc-icon ui-alt-icon" title="Visit the API Documentation" target="_blank">API Documentation <span class="ui-icon ui-icon-action"></span></a>
  26. <p>Checkbox inputs are used to provide a list of options where more than one can be selected. Checkbox buttons are enhanced by the Checkboxradio widget.</p>
  27. <h2>Basic markup</h2>
  28. <p>To create a single checkbox, add an <code>input</code> with a <code>type="checkbox"</code> attribute and a corresponding <code>label</code>. If the <code>input</code> isn't wrapped in its corresponding <code>label</code>, be sure to set the <code>for</code> attribute of the <code>label</code> to match the <code>id</code> of the <code>input</code> so they are semantically associated.</p>
  29. <div data-demo-html="true">
  30. <form>
  31. <label>
  32. <input type="checkbox" name="checkbox-0 ">Check me
  33. </label>
  34. </form>
  35. </div><!--/demo-html -->
  36. <h2>Mini size</h2>
  37. <p>For a more compact version that is useful in toolbars and tight spaces, add the <code>ui-mini</code> class to the element's <code>data-wrapper-class</code> attribute to create a mini version. </p>
  38. <div data-demo-html="true">
  39. <form>
  40. <input type="checkbox" name="checkbox-mini-0" id="checkbox-mini-0" data-wrapper-class="ui-mini">
  41. <label for="checkbox-mini-0">I agree</label>
  42. </form>
  43. </div><!--/demo-html -->
  44. <h2>Horizontal group</h2>
  45. <p>Checkboxes can be used for grouped button sets where more than one button can be selected at once, such as the bold, italic and underline button group seen in word processors. To visually integrate multiple checkboxes into a grouped button set, the framework will automatically remove all margins between buttons and round only the top and bottom corners of the set if there is a <code> data-role="controlgroup"</code> attribute on the <code>fieldset</code>.</p>
  46. <div data-demo-html="true">
  47. <form>
  48. <fieldset data-role="controlgroup">
  49. <legend>Horizontal:</legend>
  50. <input type="checkbox" name="checkbox-h-2a" id="checkbox-h-2a">
  51. <label for="checkbox-h-2a">B</label>
  52. <input type="checkbox" name="checkbox-h-2b" id="checkbox-h-2b">
  53. <label for="checkbox-h-2b"><span style="font-style:italic;font-weight:normal;">I</span></label>
  54. <input type="checkbox" name="checkbox-h-2c" id="checkbox-h-2c">
  55. <label for="checkbox-h-2c"><span style="text-decoration:underline;font-weight:normal;">U</span></label>
  56. </fieldset>
  57. </form>
  58. </div><!--/demo-html -->
  59. <h2>Vertical group</h2>
  60. <p>To make a vertical button set, add <code>data-direction="vertical"</code> to the <code>fieldset</code>.</p>
  61. <div data-demo-html="true">
  62. <form>
  63. <fieldset data-role="controlgroup" data-direction="vertical">
  64. <legend>Vertical:</legend>
  65. <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a">
  66. <label for="checkbox-v-2a">One</label>
  67. <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b">
  68. <label for="checkbox-v-2b">Two</label>
  69. <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c">
  70. <label for="checkbox-v-2c">Three</label>
  71. </fieldset>
  72. </form>
  73. </div><!--/demo-html -->
  74. <h2>Theme</h2>
  75. <p>To set the theme, add the <code>data-theme</code> attribute to the <code>fieldset</code> or to the individual checkbox inputs.</p>
  76. <div data-demo-html="true">
  77. <form>
  78. <fieldset data-role="controlgroup">
  79. <legend>Swatch B:</legend>
  80. <input type="checkbox" name="checkbox-t-2a" id="checkbox-t-2a" data-theme="b">
  81. <label for="checkbox-t-2a">One</label>
  82. <input type="checkbox" name="checkbox-t-2b" id="checkbox-t-2b" data-theme="b">
  83. <label for="checkbox-t-2b">Two</label>
  84. <input type="checkbox" name="checkbox-t-2c" id="checkbox-t-2c" data-theme="b">
  85. <label for="checkbox-t-2c">Three</label>
  86. </fieldset>
  87. </form>
  88. </div><!--/demo-html -->
  89. <h2>Disabled</h2>
  90. <div data-demo-html="true">
  91. <form>
  92. <input disabled type="checkbox" name="checkbox-t-3a" id="checkbox-t-3a" data-theme="a">
  93. <label for="checkbox-t-3a">One</label>
  94. </form>
  95. </div><!--/demo-html -->
  96. <h2>Enhanced</h2>
  97. <div data-demo-html="true">
  98. <form>
  99. <label class="ui-checkboxradio-label ui-corner-all ui-button ui-widget ui-button-inherit">
  100. <span class="ui-checkboxradio-icon ui-corner-all ui-icon ui-icon-background ui-icon-blank"></span>
  101. <span class="ui-checkboxradio-icon-space"> </span>
  102. <input type="checkbox" data-enhanced="true" name="checkbox-enhanced" class="ui-checkboxradio ui-helper-hidden-accessible">I agree
  103. </label>
  104. </form>
  105. </div><!--/demo-html -->
  106. </div><!-- /content -->
  107. <?php include( '../jqm-navmenu.php' ); ?>
  108. <div data-role="toolbar" data-type="footer" data-position="fixed" data-tap-toggle="false" class="jqm-footer">
  109. <h6>jQuery Mobile Version <span class="jqm-version"></span> Demos</h6>
  110. <ul>
  111. <li><a href="http://jquerymobile.com/" title="Visit the jQuery Mobile web site">jquerymobile.com</a></li>
  112. <li><a href="https://github.com/jquery/jquery-mobile" title="Visit the jQuery Mobile GitHub repository">GitHub repository</a></li>
  113. </ul>
  114. <p>Copyright jQuery Foundation</p>
  115. </div><!-- /footer -->
  116. </div><!-- /page -->
  117. <?php include( '../jqm-search.php' ); ?>
  118. </body>
  119. </html>