index.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="Turn checkboxes and radio buttons in toggle switches.">
  8. <meta name="author" content="Mattia Larentis, Emanuele Marchi and Peter Stein">
  9. <title>Bootstrap Switch · Turn checkboxes and radio buttons in toggle switches</title>
  10. <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
  11. <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css">
  12. <link rel="stylesheet" href="build/css/bootstrap3/bootstrap-switch.css" />
  13. <link rel="stylesheet" href="docs/lib/prism.css">
  14. <link rel="stylesheet" href="docs/index.css">
  15. <script>
  16. var _gaq = _gaq || [];
  17. _gaq.push(['_setAccount', 'UA-43092768-1']);
  18. _gaq.push(['_trackPageview']);
  19. (function () {
  20. var ga = document.createElement('script');
  21. ga.type = 'text/javascript';
  22. ga.async = true;
  23. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  24. var s = document.getElementsByTagName('script')[0];
  25. s.parentNode.insertBefore(ga, s);
  26. })();
  27. </script>
  28. </head>
  29. <body>
  30. <a href="https://github.com/nostalgiaz/bootstrap-switch" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub">
  31. </a>
  32. <header class="navbar navbar-default navbar-fixed-top header" role="banner">
  33. <div class="container">
  34. <div class="row">
  35. <div class="col-sm-10 col-sm-offset-1">
  36. <div class="navbar-header">
  37. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#collapse">
  38. <span class="sr-only">Toggle navigation</span>
  39. <span class="icon-bar"></span>
  40. <span class="icon-bar"></span>
  41. <span class="icon-bar"></span>
  42. </button>
  43. <a href="../" class="navbar-brand">Bootstrap Switch</a>
  44. </div>
  45. <nav id="collapse" class="collapse navbar-collapse" role="navigation">
  46. <ul class="nav navbar-nav">
  47. <li><a href="#getting-started">Getting started</a></li>
  48. <li><a href="https://github.com/nostalgiaz/bootstrap-switch/archive/3.0.zip">Download 3rc</a></li>
  49. <li class="dropdown">
  50. <a href="#documentation" data-toggle="dropdown">Documentation <span class="caret"></span></a>
  51. <ul class="dropdown-menu">
  52. <li><a href="#sizes">Sizes</a></li>
  53. <li><a href="#colors">Colors</a></li>
  54. <li><a href="#animation">Animation</a></li>
  55. <li><a href="#disabled">Disabled / Readonly</a></li>
  56. <li><a href="#text">Text</a></li>
  57. <li><a href="#label-text">Label Text</a></li>
  58. <li><a href="#icon-label-text">Icon Label Text</a></li>
  59. <li><a href="#event-handler">Event Handler</a></li>
  60. <li><a href="#label-event-handler">Label Event Handler</a></li>
  61. <li><a href="#state">State</a></li>
  62. <li><a href="#destroy">Destroy</a></li>
  63. <li><a href="#disable">Disable / Readonly</a></li>
  64. <li><a href="#radio">Radio</a></li>
  65. <li><a href="#form">Form</a></li>
  66. <li><a href="#modal">Modal</a></li>
  67. </ul>
  68. </li>
  69. <li><a href="https://github.com/nostalgiaz/bootstrap-switch/issues">Bug reports</a></li>
  70. </ul>
  71. </nav>
  72. </div>
  73. </div>
  74. </div>
  75. </header>
  76. <main id="main" class="jumbotron" role="main">
  77. <div class="container">
  78. <h1>Bootstrap Switch</h1>
  79. <p class="lead">Turn checkboxes and radio buttons in toggle switches.</p>
  80. <div>
  81. <a href="https://github.com/nostalgiaz/bootstrap-switch/archive/3.0.zip" class="btn btn-lg btn-primary">Download Bootstrap Switch 3 Release Candidate</a><br>
  82. <a href="https://github.com/nostalgiaz/bootstrap-switch/archive/master.zip" class="btn btn-link">Download Stable Bootstrap Switch 2</a>
  83. </div>
  84. <br>
  85. <iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&amp;repo=bootstrap-switch&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="120" height="30"></iframe>
  86. <iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&amp;repo=bootstrap-switch&amp;type=fork&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="30"></iframe>
  87. <iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&amp;type=follow&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="190" height="30"></iframe>
  88. <iframe src="http://ghbtns.com/github-btn.html?user=LostCrew&amp;type=follow&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
  89. <iframe src="http://ghbtns.com/github-btn.html?user=BdMdesigN&amp;type=follow&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
  90. <br>
  91. <br>
  92. <p class="people">
  93. <a href="http://larentis.eu" target="_blank">Mattia Larentis</a> · <a href="http://www.bdmdesign.org/" target="_blank">Peter Stein</a> · <a href="http://www.lostcrew.it" target="_blank">Emanuele Marchi</a>
  94. </p>
  95. </div>
  96. </div>
  97. </main>
  98. <div class="container">
  99. <div class="row">
  100. <div class="col-sm-10 col-sm-offset-1">
  101. <section id="getting-started" class="section">
  102. <div class="page-header">
  103. <h2><a href="#getting-started">Getting started</a></h2>
  104. </div>
  105. <p>Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript.</p>
  106. <pre class="language-markup"><code>[...]
  107. &lt;link href="bootstrap.css" rel="stylesheet"&gt;
  108. &lt;link href="bootstrap-switch.css" rel="stylesheet"&gt;
  109. &lt;script src="jquery.js"&gt;&lt;/script&gt;
  110. &lt;script src="bootstrap-switch.js"&gt;&lt;/script&gt;
  111. [...]</code></pre>
  112. <p>Add your checkbox.</p>
  113. <pre class="language-markup"><code>&lt;input type="checkbox" name="my-checkbox" checked&gt;</code></pre>
  114. <p>Initialize Bootstrap Switch.</p>
  115. <pre class="language-javascript"><code>$("[name='my-checkbox']").bootstrapSwitch();</code></pre>
  116. <p>Enjoy.</p>
  117. </section>
  118. <div class="page-header">
  119. <h2><a href="#documentation">Documentation</a></h2>
  120. </div>
  121. <section id="sizes" class="section">
  122. <div class="page-header">
  123. <h3><a href="#sizes">Sizes</a></h3>
  124. </div>
  125. <input type="checkbox" checked data-size="large">
  126. <input type="checkbox" checked>
  127. <input type="checkbox" checked data-size="small">
  128. <input type="checkbox" checked data-size="mini">
  129. <br>
  130. <br>
  131. <p>Change the size programmatically:</p>
  132. <input type="checkbox" id="dimension-switch" checked>
  133. <br>
  134. <br>
  135. <button id="btn-size-large-switch" class="btn btn-default">Large</button>
  136. <button id="btn-size-regular-switch" class="btn btn-default">Regular</button>
  137. <button id="btn-size-small-switch" class="btn btn-default">Small</button>
  138. <button id="btn-size-mini-switch" class="btn btn-default">Mini</button>
  139. <br>
  140. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-size="large">
  141. &lt;input type="checkbox" checked>
  142. &lt;input type="checkbox" checked data-size="small">
  143. &lt;input type="checkbox" checked data-size="mini">
  144. &lt;input id="dimension-switch" type="checkbox" checked></code></pre>
  145. <pre class="language-javascript"><code>// Resets to the regular style
  146. $('#dimension-switch').bootstrapSwitch('size', '');
  147. // Sets a mini switch
  148. $('#dimension-switch').bootstrapSwitch('size', 'mini');
  149. // Sets a small switch
  150. $('#dimension-switch').bootstrapSwitch('size', 'small');
  151. // Sets a large switch
  152. $('#dimension-switch').bootstrapSwitch('size', 'large');</code></pre>
  153. </section>
  154. <section id="colors" class="section">
  155. <div class="page-header">
  156. <h3><a href="#colors">Colors</a></h3>
  157. </div>
  158. <input type="checkbox" checked data-on-color="primary" data-off-color="info">
  159. <input type="checkbox" checked data-on-color="info" data-off-color="success">
  160. <input type="checkbox" checked data-on-color="success" data-off-color="warning">
  161. <input type="checkbox" checked data-on-color="warning" data-off-color="danger">
  162. <input type="checkbox" checked data-on-color="danger" data-off-color="default">
  163. <input type="checkbox" checked data-on-color="default" data-off-color="primary">
  164. <br>
  165. <br>
  166. <span>Change the colors programmatically:</span>
  167. <input type="checkbox" id="change-color-switch" checked data-on-color="default" data-off-color="primary">
  168. <br>
  169. <br>
  170. <button id="btn-color-on-switch" class="btn btn-success">Change ON color</button>
  171. <button id="btn-color-off-switch" class="btn btn-danger">Change OFF color</button>
  172. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-on-color="primary" data-off-color="info">
  173. &lt;input type="checkbox" checked data-on-color="info" data-off-color="success">
  174. &lt;input type="checkbox" checked data-on-color="success" data-off-color="warning">
  175. &lt;input type="checkbox" checked data-on-color="warning" data-off-color="danger">
  176. &lt;input type="checkbox" checked data-on-color="danger" data-off-color="default">
  177. &lt;input type="checkbox" checked data-on-color="default" data-off-color="primary">
  178. &lt;input type="checkbox" id="change-color-switch" checked data-on-color="default" data-off-color="primary"></code></pre>
  179. <pre class="language-javascript"><code>$('#change-color-switch').bootstrapSwitch('onColor', 'success');
  180. $('#change-color-switch').bootstrapSwitch('offColor', 'danger');</code></pre>
  181. </section>
  182. <section id="animation" class="section">
  183. <div class="page-header">
  184. <h3><a name="animation" class="anchor" href="#animation">Animation <small>JavaScript</small></a></h3>
  185. </div>
  186. <input type="checkbox" id="animated-switch" checked data-animated="false">
  187. <br>
  188. <br>
  189. <button id="btn-animate-switch" class="btn btn-default">Animate</button>
  190. <button id="btn-dont-animate-switch" class="btn btn-default">Don't animate</button>
  191. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-animate="false"></code></pre>
  192. <pre class="language-javascript"><code>// Enables animation for the selected item
  193. $('#animated-switch').bootstrapSwitch('animate', true);
  194. // Disables animation for the selected item
  195. $('#animated-switch').bootstrapSwitch('animate', false);</code></pre>
  196. </section>
  197. <section id="disabled" class="section">
  198. <div class="page-header">
  199. <h3><a name="disabled" class="anchor" href="#disabled">Disabled / Readonly</a></h3>
  200. </div>
  201. <input type="checkbox" checked disabled>
  202. <input type="checkbox" checked readonly>
  203. <pre class="language-markup"><code>&lt;input type="checkbox" checked disabled>
  204. &lt;input type="checkbox" checked readonly></code></pre>
  205. </section>
  206. <section id="text" class="section">
  207. <div class="page-header">
  208. <h3><a name="text" class="anchor" href="#text">Text</a></h3>
  209. </div>
  210. <input type="checkbox" id="label-switch" checked data-on-text="SI" data-off-text="NO">
  211. <br>
  212. <br>
  213. <button id="btn-label-on-switch" class="btn btn-default">Change "On" label</button>
  214. <button id="btn-label-off-switch" class="btn btn-default">Change "Off" label</button>
  215. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-on-text="SI" data-off-text="NO"></code></pre>
  216. <pre class="language-javascript"><code>$('#label-switch').bootstrapSwitch('onText', 'I');
  217. $('#label-switch').bootstrapSwitch('offText', 'O');</code></pre>
  218. </section>
  219. <section id="label-text" class="section">
  220. <div class="page-header">
  221. <h3><a href="#label-text">Label Text</a></h3>
  222. </div>
  223. <input type="checkbox" checked data-label-text="TV">
  224. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-label-text="TV"></code></pre>
  225. </section>
  226. <section id="icon-label-text" class="section">
  227. <div class="page-header">
  228. <h3><a name="icon-label-text" class="anchor" href="#html-text-label-icon">Icon Label Text</a></h3>
  229. </div>
  230. Standard <input type="checkbox" checked data-size="large" data-label-text="<span class='glyphicon glyphicon-fullscreen'></span>" data-on-text="<span class='glyphicon glyphicon-ok'></span>" data-off-text="<span class='glyphicon glyphicon-remove'></span>"> &nbsp;&nbsp;
  231. Font Awesome <input type="checkbox" checked data-size="large" data-label-text="<span class='fa fa-youtube fa-lg'></span>" data-on-text="<span class='fa fa-thumbs-up fa-lg'></span>" data-off-text="<span class='fa fa-thumbs-down fa-lg'></span>"> &nbsp;&nbsp;
  232. <pre class="language-markup"><code>&lt;input type="checkbox" checked data-size="large" data-label-text="&lt;span class='glyphicon glyphicon-fullscreen'>&lt;/span>" data-on-text="&lt;span class='glyphicon glyphicon-ok'>&lt;/span>" data-off-text="&lt;span class='glyphicon glyphicon-remove'>&lt;/span>">
  233. &lt;input type="checkbox" checked data-size="large" data-label-text="&lt;span class='fa fa-youtube fa-lg'>&lt;/span>" data-on-text="&lt;span class='fa fa-thumbs-up fa-lg'>&lt;/span>" data-off-text="&lt;span class='fa fa-thumbs-down fa-lg'>&lt;/span>"></code></pre>
  234. </section>
  235. <section id="event-handler" class="section">
  236. <div class="page-header">
  237. <h3><a name="event-handler" class="anchor" href="#event-handler">Event Handler <small>JavaScript</small></a></h3>
  238. </div>
  239. <input type="checkbox" id="switch-change" checked>
  240. <pre class="language-javascript"><code>$('#switch-change').on('switchChange', function (e, data) {
  241. var $element = $(data.el),
  242. value = data.value;
  243. console.log(e, $element, value);
  244. });</code></pre>
  245. </section>
  246. <section id="label-event-handler" class="section">
  247. <div class="page-header">
  248. <h3><a name="label-event-handler" class="anchor" href="#label-event-handler">Label Event Handler <small>JavaScript</small></a></h3>
  249. </div>
  250. <label id="label-toggle-switch">Click on this Text to change the switch state</label>
  251. <input type="checkbox" checked class="label-toggle-switch">
  252. <pre class="language-markup"><code>&lt;label id="label-toggle-switch">Click on this Text to change the switch state&lt;/label>
  253. &lt;input type="checkbox" checked></code></pre>
  254. <pre class="language-javascript"><code>$('#label-toggle-switch').on('click', function(e, data) {
  255. $('.label-toggle-switch').bootstrapSwitch('toggleState');
  256. });
  257. $('.label-toggle-switch').on('switchChange', function (e, data) {
  258. alert(data.value);
  259. });</code></pre>
  260. </section>
  261. <section id="state" class="section">
  262. <div class="page-header">
  263. <h3><a name="state" class="anchor" href="#state">State <small>JavaScript</small></a></h3>
  264. </div>
  265. <input type="checkbox" id="toggle-state-switch" checked>
  266. <br>
  267. <br>
  268. <div id="toggle-state-switch-button-state" class="btn btn-default">Get State</div>
  269. <div id="toggle-state-switch-button-on" class="btn btn-default">Set On</div>
  270. <div id="toggle-state-switch-button-off" class="btn btn-default">Set Off</div>
  271. <div id="toggle-state-switch-button" class="btn btn-default">Toggle State</div>
  272. <pre class="language-javascript"><code>$('#toggle-state-switch').bootstrapSwitch('state'); // Get the state
  273. $('#toggle-state-switch').bootstrapSwitch('state', false); // Set the state as off
  274. $('#toggle-state-switch').bootstrapSwitch('state', false, false); // Set the state as off and do not trigger switchChange event
  275. $('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state
  276. $('#toggle-state-switch').bootstrapSwitch('toggleState'); // Toggle the state and do not trigger switchChange event
  277. </code></pre>
  278. </section>
  279. <section id="destroy" class="section">
  280. <div class="page-header">
  281. <h3><a name="destroy" class="anchor" href="#destroy">Destroy <small>JavaScript</small></a></h3>
  282. </div>
  283. <input type="checkbox" id="destroy-switch" checked>
  284. <br>
  285. <br>
  286. <button id="btn-destroy-switch" class="btn btn-default">Destroy Bootstrap Switch!</button>
  287. <pre class="language-javascript"><code>$('#destroy-switch').bootstrapSwitch('destroy');</code></pre>
  288. </section>
  289. <section id="disable" class="section">
  290. <div class="page-header">
  291. <h3><a name="disable" class="anchor" href="#disable">Disable / Readonly <small>JavaScript</small></a></h3>
  292. </div>
  293. <label for="disable-switch">Disable controls</label>
  294. <input type="checkbox" id="disable-switch" checked>
  295. <br>
  296. <br>
  297. <button id="btn-disable-is" class="btn btn-default">Is disabled?</button>
  298. <button id="btn-disable-toggle" class="btn btn-default">Toggle Disable</button>
  299. <button id="btn-disable-set" class="btn btn-default">Set Disable</button>
  300. <button id="btn-disable-remove" class="btn btn-default">Remove Disable</button>
  301. <br>
  302. <br>
  303. <label for="readonly-switch">Readonly controls</label>
  304. <input type="checkbox" id="readonly-switch" checked>
  305. <br>
  306. <br>
  307. <button id="btn-readonly-is" class="btn btn-default">Is readonly?</button>
  308. <button id="btn-readonly-toggle" class="btn btn-default">Toggle readonly</button>
  309. <button id="btn-readonly-set" class="btn btn-default">Set Readonly</button>
  310. <button id="btn-readonly-remove" class="btn btn-default">Remove Readonly</button>
  311. <pre class="language-javascript"><code>$('#disable-switch').bootstrapSwitch('disabled');
  312. $('#disable-switch').bootstrapSwitch('toggleDisabled');
  313. $('#disable-switch').bootstrapSwitch('disabled', true); // true || false
  314. $('#readonly-switch').bootstrapSwitch('readonly');
  315. $('#readonly-switch').bootstrapSwitch('toggleReadonly');
  316. $('#readonly-switch').bootstrapSwitch('readonly', true); // true || false</code></pre>
  317. </section>
  318. <section id="radio" class="section">
  319. <div class="page-header">
  320. <h3><a name="radio" class="anchor" href="#radio">Radio <small>JavaScript</small></a></h3>
  321. </div>
  322. <div class="form-group">
  323. <label for="option1">Option 1</label>
  324. <input id="option1" type="radio" name="radio1" value="option1"> &nbsp;&nbsp;
  325. <label for="option2">Option 2</label>
  326. <input id="option2" type="radio" name="radio1" value="option2"> &nbsp;&nbsp;
  327. <label for="option3">Option 3</label>
  328. <input id="option3" type="radio" name="radio1" value="option3">
  329. </div>
  330. <pre class="language-markup"><code>&lt;div class="form-group">
  331. &lt;label for="option1">Option 1&lt;/label>
  332. &lt;input id="option1" type="radio" name="radio1" value="option1">
  333. &lt;label for="option2">Option 2&lt;/label>
  334. &lt;input id="option2" type="radio" name="radio1" value="option2">
  335. &lt;label for="option3">Option 3&lt;/label>
  336. &lt;input id="option3" type="radio" name="radio1" value="option3">
  337. &lt;/div></code></pre>
  338. </section>
  339. <section id="form" class="section">
  340. <div class="page-header">
  341. <h3><a name="form" class="anchor" href="#form">Form</a></h3>
  342. </div>
  343. <form class="clearfix" role="form">
  344. <div class="form-group">
  345. <label class="control-label" for="inputEmail">Email</label>
  346. <input type="text" id="inputEmail" placeholder="Email" class="form-control">
  347. </div>
  348. <div class="form-group">
  349. <label class="control-label" for="notification1">Notification 1</label>
  350. <input id="notification1" type="checkbox">
  351. </div>
  352. <div class="form-group">
  353. <label class="control-label" for="notification2">Notification 2</label>
  354. <input id="notification2" type="checkbox">
  355. </div>
  356. <div class="form-actions">
  357. <button type="reset" class="btn btn-default btn-warning">Reset</button>
  358. </div>
  359. </form>
  360. <pre class="language-markup"><code>&lt;form class="form-horizontal">
  361. &lt;div class="form-group">
  362. &lt;label class="control-label" for="inputEmail">Email&lt;/label>
  363. &lt;input type="text" id="inputEmail" placeholder="Email">
  364. &lt;/div>
  365. &lt;div class="form-group">
  366. &lt;label class="control-label" for="notification1">Notification 1&lt;/label>
  367. &lt;input id="notification1" type="checkbox">
  368. &lt;/div>
  369. &lt;div class="form-group">
  370. &lt;label class="control-label" for="notification2">Notification 2&lt;/label>
  371. &lt;input id="notification2" type="checkbox">
  372. &lt;/div>
  373. &lt;div class="form-actions">
  374. &lt;button type="reset" class="btn btn-inverse">Reset&lt;/button>
  375. &lt;/div>
  376. &lt;/form></code></pre>
  377. </section>
  378. <section id="modal" class="section">
  379. <div class="page-header">
  380. <h3><a name="modal" class="anchor" href="#modal">Modal</a></h3>
  381. </div>
  382. <a href="#myModal" role="button" class="btn btn-default" data-toggle="modal">Modal</a>
  383. <pre class="language-markup"><code>&lt;a href="#myModal" role="button" class="btn btn-default" data-toggle="modal">Modal&lt;/a>
  384. &lt;div class="modal-body">
  385. &lt;input type="checkbox" checked>
  386. &lt;/div></code></pre>
  387. </section>
  388. <footer class="footer">
  389. <p>&copy; by <a href="http://larentis.eu" target="_blank">Mattia Larentis</a> (<a href="https://twitter.com/SpiritualGuru">@SpiritualGuru</a>), <a href="http://www.bdmdesign.org/" target="_blank">Peter Stein</a> and <a href="http://www.lostcrew.it/" target="_blank">Emanuele Marchi</a></p>
  390. </footer>
  391. </div>
  392. </div>
  393. </div>
  394. <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  395. <div class="modal-dialog">
  396. <div class="modal-content">
  397. <div class="modal-header">
  398. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  399. <h3>Modal</h3>
  400. </div>
  401. <div class="modal-body">
  402. <input type="checkbox" checked>
  403. </div>
  404. <div class="modal-footer">
  405. <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
  411. <script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
  412. <script src="build/js/bootstrap-switch.js"></script>
  413. <script src="docs/lib/prism.js"></script>
  414. <script src="docs/index.js"></script>
  415. </body>
  416. </html>