可展开列的jQuery表格插件

可展开列的jQuery表格插件

这是一款可展开列的jQuery表格插件。该插件首先在初始化时,所有的表格列采用简洁的显示方式,当用户点击表格列头时,该列被展开,显示详细信息。

使用方法
在页面中引入下面的文件。

1
2
3
4
5
<link rel="stylesheet" type="text/css" href="assets/css/demo.css" />
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<script src="https://unpkg.com/imagesloaded@4.1.4/imagesloaded.pkgd.min.js"></script>
<script src="assets/js/demo.js"></script>

HTML结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<div class="loader">
  <div class="lds-ripple">
    <div></div>
    <div></div>
  </div>
</div>
<aside class="sidebar">
  <div class="logo">
    <a href="#">+</a>
  </div>
</aside>
 
<section class="table-wrapper">
  <table>
    <thead>
      <tr>
        <th></th>
        <th class="trigger"><p>Basic</p></th>
        <th class="trigger"><p>Basic</p><span>plus</span></th>
        <th class="trigger"><p>Standard</p></th>
        <th class="trigger"><p>Standard</p><span>plus</span></th>
        <th class="trigger"><p>Medium</p></th>
        <th class="trigger"><p>Medium</p><span>plus</span></th>
        <th class="trigger"><p>Large</p></th>
        <th class="trigger"><p>Large</p><span>plus</span></th>
        <th class="trigger"><p>Extended</p></th>
        <th class="trigger"><p>Extended</p><span>plus</span></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><p><strong>Price</strong></p></td>
        <td><p>$19</p> <span>Per Month</span></td>
        <td><p>$29</p> <span>Per Month</span></td>
        <td><p>$39</p> <span>Per Month</span></td>
        <td><p>$49</p> <span>Per Month</span></td>
        <td><p>$59</p> <span>Per Month</span></td>
        <td><p>$69</p> <span>Per Month</span></td>
        <td><p>$79</p> <span>Per Month</span></td>
        <td><p>$89</p> <span>Per Month</span></td>
        <td><p>$99</p> <span>Per Month</span></td>
        <td><p>$129</p> <span>Per Month</span></td>
      </tr>
      <tr>
        <td><p><strong>Bandwidth</strong></p><p>Monthly</p></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>1GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>2GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>3GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>4GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>5GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>6GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>7GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>8GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>9GB *</p><span>Unlimited in first year</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>12GB *</p><span>Unlimited in first year</span></td>
      </tr>
      <tr>
        <td><p><strong>Storage</strong></p><p>Free installation</p></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>1GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>2GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>3GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>4GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>5GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>6GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>7GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>8GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>9GB *</p><span>Free installation</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>12GB *</p><span>Free installation</span></td>
      </tr>
      <tr>
        <td><p><strong>Add Ons</strong></p><p>Sub domains</p></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>1 *</p>
          <span>Sub domain</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>2 *</p>
          <span>Sub domains</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>3 *</p>
          <span>Sub domains</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>4 *</p>
          <span>Sub domains</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>5 *</p>
          <span>Sub domains</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>6 *</p>
          <span>Sub domains</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>7 *</p>
          <span>Sub domains</span></td>
      </tr>
      <tr>
        <td><p><strong>Database</strong></p><p>Support</p></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <p>- *</p>
          <span>Without Sub domain</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>1 *</p>
          <span>MySQL Database - Without Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>2 *</p>
          <span>MySQL Databases - Without Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>3 *</p>
          <span>MySQL Databases - Without Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>4 *</p>
          <span>MySQL Databases - With Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>5 *</p>
          <span>MySQL Databases - With Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>6 *</p>
          <span>MySQL Databases - With Support</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <p>7 *</p>
          <span>MySQL Databases - With Support</span></td>
      </tr>
      <tr>
        <td><p><strong>Backup</strong></p><p>Free (Yes/No)</p></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <span>No.</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <span>No.</span></td>
        <td><img src="assets/img/icon-close.png" class="close" alt=""/>
          <span>No.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>  
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>  
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>  
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>
          <span>Yes.</span></td>
        <td><img src="assets/img/icon-correct.png" class="correct" alt=""/>  
          <span>Yes.</span></td>
      </tr>
    </tbody>
  </table>
</section>
当前内容只有登录了才能查看,如果您已经注册,请登录
3

发表评论