getting-started.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Getting started &middot; Bootstrap Table</title>
  6. <meta name="author" content="zhixin">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../src/bootstrap-table.css">
  10. <link rel="stylesheet" href="docs.css">
  11. <link rel="stylesheet" href="//wenzhixin.net.cn/css/fork.css">
  12. <!--[if lt IE 9]>
  13. <script src="//wenzhixin.net.cn/js/html5shiv.js"></script>
  14. <script src="//wenzhixin.net.cn/js/respond.min.js"></script>
  15. <![endif]-->
  16. </head>
  17. <body>
  18. <a class="sr-only" href="#content">Skip to main content</a>
  19. <header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav">
  20. <div class="container">
  21. <div class="navbar-header">
  22. <a class="navbar-brand" href="index.html">
  23. Bootstrap Table
  24. </a>
  25. </div>
  26. <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
  27. <ul class="nav navbar-nav">
  28. <li class="active">
  29. <a href="getting-started.html">Getting started</a>
  30. </li>
  31. <li>
  32. <a href="documentation.html">Documentation</a>
  33. </li>
  34. <li>
  35. <a href="examples.html">Examples</a>
  36. </li>
  37. </ul>
  38. </nav>
  39. </div>
  40. </header>
  41. <div class="bs-header" id="content">
  42. <div class="container">
  43. <h1>Getting started</h1>
  44. <p>An overview of Bootstrap Table, how to download and use, basic templates, and more.</p>
  45. </div>
  46. </div>
  47. <div class="container">
  48. <div class="row">
  49. <div class="col-md-3">
  50. <div class="bs-sidebar" role="complementary">
  51. <ul class="nav bs-sidenav">
  52. <li><a href="#download">Download</a></li>
  53. <li>
  54. <a href="#usage">Usage</a>
  55. <ul class="nav">
  56. <li><a href="#via-data">Via data attributes</a></li>
  57. <li><a href="#via-javascript">Via JavaScript</a></li>
  58. <li><a href="#options">Options</a></li>
  59. </ul>
  60. </li>
  61. </ul>
  62. </div>
  63. </div>
  64. <div class="col-md-9" role="main">
  65. <div class="page-header alert alert-info">
  66. <a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a>
  67. Bootstrap Table is licensed under the The MIT License. Completely free, you can arbitrarily use and modify this plugin. If you like this plugin, you can give me a <a href="http://github.com/wenzhixin/bootstrap-table">star</a>, and I will do better, thanks.
  68. </div>
  69. <div>
  70. <div class="page-header">
  71. <h1 id="download">Download</h1>
  72. </div>
  73. <p>
  74. <a href="https://github.com/wenzhixin/bootstrap-table/archive/master.zip">Download source</a>
  75. </p>
  76. <p>
  77. <a href="https://github.com/wenzhixin/bootstrap-table">Clone or fork via GitHub</a>
  78. </p>
  79. </div>
  80. <div>
  81. <div class="page-header">
  82. <h1 id="usage">Usage</h1>
  83. </div>
  84. <p>Include Bootstrap library (if your project doesn’t use it already) and bootstrap-table.css in the head tag your html document.</p>
  85. <pre><code>&lt;link rel="stylesheet" href="bootstrap.css"&gt;
  86. &lt;link rel="stylesheet" href="bootstrap-table.css"&gt;</code></pre>
  87. <p>Include jQuery library (if your project doesn’t use it already) and bootstrap-table.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).</p>
  88. <pre><code>&lt;script src="jquery.min.js"&gt;&lt;/script&gt;
  89. &lt;script src="bootstrap-table.js"&gt;&lt;/script&gt;</code></pre>
  90. <hr>
  91. <p>The bootstrap table plugin displays data in a tabular format, via data attributes or JavaScript.</p>
  92. <h2 id="via-data">Via data attributes</h2>
  93. <p>Activate bootstrap table without writing JavaScript. Set data-toggle="table" on a normal table.</p>
  94. <pre><code>&lt;table data-toggle="table" data-url="data.json"&gt;
  95. &lt;thead&gt;
  96. ...
  97. &lt;/thead&gt;
  98. &lt;/table&gt;</code></pre>
  99. <h2 id="via-javascript">Via JavaScript</h2>
  100. <p>Call a bootstrap table with id table with JavaScript.</p>
  101. <pre><code>$('#table').bootstrapTable({
  102. url: 'data.json'
  103. });</code></pre>
  104. <h2 id="options">Options</h2>
  105. <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-url="data.json"</code>. More options see the <a href="documentation.html">Documentation</a> or the <a href="examples.html">Examples</a>.</p>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <a href="https://github.com/wenzhixin/bootstrap-table" class="fork_me"></a>
  111. <footer class="bs-footer" role="contentinfo">
  112. <div class="container">
  113. <p>Copyright © 2012-2014, Bootstrap Table is licensed under the The MIT License. Coded by wenzhixin. </p>
  114. <ul class="footer-links">
  115. <li>Currently: v1.0.2</li>
  116. <li class="muted">·</li>
  117. <li><a href="http://wenzhixin.net.cn">My website</a></li>
  118. <li class="muted">·</li>
  119. <li><a href="http://repos.wenzhixin.net.cn">My repos</a></li>
  120. <li class="muted">·</li>
  121. <li><a href="https://github.com/wenzhixin">Github (@wenzhixin)</a></li>
  122. <li class="muted">·</li>
  123. <li><a href="https://github.com/wenzhixin/bootstrap-table/issues?state=open">Issues</a></li>
  124. <li class="muted">·</li>
  125. <li><a href="mailto:wenzhixin2010@gmail.com">Email</a></li>
  126. </ul>
  127. </div>
  128. </footer>
  129. <script src="../assets/jquery.min.js"></script>
  130. <script src="../assets/bootstrap/js/bootstrap.min.js"></script>
  131. <script src="../src/bootstrap-table.js"></script>
  132. <script src="docs.js"></script>
  133. <script src="//wenzhixin.net.cn/js/analytics.js"></script>
  134. </body>
  135. </html>