Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.41 KB | None | 0 0
  1. <div class="scrollableContainer">
  2.  
  3. <table>
  4. <thead>
  5. <tr class="ui-state-default">
  6. <th colspan="4">Original</th>
  7. <th colspan="4">table heading</th>
  8. <th colspan="4">table heading</th>
  9. <th colspan="4">table heading</th>
  10. <th colspan="4">table heading</th>
  11. <th colspan="4">Current Pos</th>
  12. </tr>
  13. </thead>
  14. <tfoot>
  15. <tr class="ui-state-default">
  16. <th colspan="4">Original</th>
  17. <th colspan="4">table footer</th>
  18. <th colspan="4">table footer</th>
  19. <th colspan="4">table footer</th>
  20. <th colspan="4">table footer</th>
  21. <th colspan="4">Current Pos</th>
  22. </tr>
  23. </tfoot>
  24. <tbody>
  25. <tr class="ui-state-default">
  26. <th colspan="4">First Row</th>
  27. <td colspan="4">data</td>
  28. <td colspan="4">data</td>
  29. <td colspan="4">data</td>
  30. <td colspan="4">data</td>
  31. <td colspan="4">1</td>
  32. </tr>
  33. <tr class="ui-state-default even">
  34. <th colspan="4">Second Row</th>
  35. <td colspan="4">data</td>
  36. <td colspan="4">data</td>
  37. <td colspan="4">data</td>
  38. <td colspan="4">data</td>
  39. <td colspan="4">2</td>
  40. </tr>
  41. <tr class="ui-state-default">
  42. <th colspan="4">Third Row</th>
  43. <td colspan="4">data</td>
  44. <td colspan="4">data</td>
  45. <td colspan="4">data</td>
  46. <td colspan="4">data</td>
  47. <td colspan="4">3</td>
  48. </tr>
  49. <tr class="ui-state-default even">
  50. <th colspan="4">Fourth Row</th>
  51. <td colspan="4">data</td>
  52. <td colspan="4">data</td>
  53. <td colspan="4">data</td>
  54. <td colspan="4">data</td>
  55. <td colspan="4">4</td>
  56. </tr>
  57. <tr class="ui-state-default">
  58. <th colspan="4">Fifth Row</th>
  59. <td colspan="4">data</td>
  60. <td colspan="4">data</td>
  61. <td colspan="4">data</td>
  62. <td colspan="4">data</td>
  63. <td colspan="4">5</td>
  64. </tr>
  65. <tr class="ui-state-default">
  66. <th colspan="4">Fifth Row</th>
  67. <td colspan="4">data</td>
  68. <td colspan="4">data</td>
  69. <td colspan="4">data</td>
  70. <td colspan="4">data</td>
  71. <td colspan="4">5</td>
  72. </tr>
  73. <tr class="ui-state-default">
  74. <th colspan="4">Fifth Row</th>
  75. <td colspan="4">data</td>
  76. <td colspan="4">data</td>
  77. <td colspan="4">data</td>
  78. <td colspan="4">data</td>
  79. <td colspan="4">5</td>
  80. </tr>
  81. <tr class="ui-state-default">
  82. <th colspan="4">Fifth Row</th>
  83. <td colspan="4">data</td>
  84. <td colspan="4">data</td>
  85. <td colspan="4">data</td>
  86. <td colspan="4">data</td>
  87. <td colspan="4">5</td>
  88. </tr>
  89. <tr class="ui-state-default">
  90. <th colspan="4">Fifth Row</th>
  91. <td colspan="4">data</td>
  92. <td colspan="4">data</td>
  93. <td colspan="4">data</td>
  94. <td colspan="4">data</td>
  95. <td colspan="4">5</td>
  96. </tr>
  97. <tr class="ui-state-default">
  98. <th colspan="4">Fifth Row</th>
  99. <td colspan="4">data</td>
  100. <td colspan="4">data</td>
  101. <td colspan="4">data</td>
  102. <td colspan="4">data</td>
  103. <td colspan="4">5</td>
  104. </tr>
  105. <tr class="ui-state-default">
  106. <th colspan="4">Fifth Row</th>
  107. <td colspan="4">data</td>
  108. <td colspan="4">data</td>
  109. <td colspan="4">data</td>
  110. <td colspan="4">data</td>
  111. <td colspan="4">5</td>
  112. </tr>
  113. <tr class="ui-state-default">
  114. <th colspan="4">Fifth Row</th>
  115. <td colspan="4">data</td>
  116. <td colspan="4">data</td>
  117. <td colspan="4">data</td>
  118. <td colspan="4">data</td>
  119. <td colspan="4">5</td>
  120. </tr>
  121. <tr class="ui-state-default">
  122. <th colspan="4">Fifth Row</th>
  123. <td colspan="4">data</td>
  124. <td colspan="4">data</td>
  125. <td colspan="4">data</td>
  126. <td colspan="4">data</td>
  127. <td colspan="4">5</td>
  128. </tr>
  129. <tr class="ui-state-default">
  130. <th colspan="4">Fifth Row</th>
  131. <td colspan="4">data</td>
  132. <td colspan="4">data</td>
  133. <td colspan="4">data</td>
  134. <td colspan="4">data</td>
  135. <td colspan="4">5</td>
  136. </tr>
  137. <tr class="ui-state-default">
  138. <th colspan="4">Fifth Row</th>
  139. <td colspan="4">data</td>
  140. <td colspan="4">data</td>
  141. <td colspan="4">data</td>
  142. <td colspan="4">data</td>
  143. <td colspan="4">5</td>
  144. </tr>
  145. <tr class="ui-state-default">
  146. <th colspan="4">Fifth Row</th>
  147. <td colspan="4">data</td>
  148. <td colspan="4">data</td>
  149. <td colspan="4">data</td>
  150. <td colspan="4">data</td>
  151. <td colspan="4">5</td>
  152. </tr>
  153. <tr class="ui-state-default">
  154. <th colspan="4">Fifth Row</th>
  155. <td colspan="4">data</td>
  156. <td colspan="4">data</td>
  157. <td colspan="4">data</td>
  158. <td colspan="4">data</td>
  159. <td colspan="4">5</td>
  160. </tr>
  161. <tr class="ui-state-default">
  162. <th colspan="4">Fifth Row</th>
  163. <td colspan="4">data</td>
  164. <td colspan="4">data</td>
  165. <td colspan="4">data</td>
  166. <td colspan="4">data</td>
  167. <td colspan="4">5</td>
  168. </tr>
  169. <tr class="ui-state-default">
  170. <th colspan="4">Fifth Row</th>
  171. <td colspan="4">data</td>
  172. <td colspan="4">data</td>
  173. <td colspan="4">data</td>
  174. <td colspan="4">data</td>
  175. <td colspan="4">5</td>
  176. </tr>
  177. <tr class="ui-state-default">
  178. <th colspan="4">Fifth Row</th>
  179. <td colspan="4">data</td>
  180. <td colspan="4">data</td>
  181. <td colspan="4">data</td>
  182. <td colspan="4">data</td>
  183. <td colspan="4">5</td>
  184. </tr>
  185. <tr class="ui-state-default">
  186. <th colspan="4">Fifth Row</th>
  187. <td colspan="4">data</td>
  188. <td colspan="4">data</td>
  189. <td colspan="4">data</td>
  190. <td colspan="4">data</td>
  191. <td colspan="4">5</td>
  192. </tr>
  193. <tr class="ui-state-default">
  194. <th colspan="4">Fifth Row</th>
  195. <td colspan="4">data</td>
  196. <td colspan="4">data</td>
  197. <td colspan="4">data</td>
  198. <td colspan="4">data</td>
  199. <td colspan="4">5</td>
  200. </tr>
  201. <tr class="ui-state-default">
  202. <th colspan="4">Fifth Row</th>
  203. <td colspan="4">data</td>
  204. <td colspan="4">data</td>
  205. <td colspan="4">data</td>
  206. <td colspan="4">data</td>
  207. <td colspan="4">5</td>
  208. </tr>
  209. <tr class="ui-state-default">
  210. <th colspan="4">Fifth Row</th>
  211. <td colspan="4">data</td>
  212. <td colspan="4">data</td>
  213. <td colspan="4">data</td>
  214. <td colspan="4">data</td>
  215. <td colspan="4">5</td>
  216. </tr>
  217. <tr class="ui-state-default">
  218. <th colspan="4">Fifth Row</th>
  219. <td colspan="4">data</td>
  220. <td colspan="4">data</td>
  221. <td colspan="4">data</td>
  222. <td colspan="4">data</td>
  223. <td colspan="4">5</td>
  224. </tr>
  225. <tr class="ui-state-default">
  226. <th colspan="4">Fifth Row</th>
  227. <td colspan="4">data</td>
  228. <td colspan="4">data</td>
  229. <td colspan="4">data</td>
  230. <td colspan="4">data</td>
  231. <td colspan="4">5</td>
  232. </tr>
  233. <tr class="ui-state-default">
  234. <th colspan="4">Fifth Row</th>
  235. <td colspan="4">data</td>
  236. <td colspan="4">data</td>
  237. <td colspan="4">data</td>
  238. <td colspan="4">data</td>
  239. <td colspan="4">5</td>
  240. </tr>
  241. <tr class="ui-state-default">
  242. <th colspan="4">Fifth Row</th>
  243. <td colspan="4">data</td>
  244. <td colspan="4">data</td>
  245. <td colspan="4">data</td>
  246. <td colspan="4">data</td>
  247. <td colspan="4">5</td>
  248. </tr>
  249. <tr class="ui-state-default">
  250. <th colspan="4">Fifth Row</th>
  251. <td colspan="4">data</td>
  252. <td colspan="4">data</td>
  253. <td colspan="4">data</td>
  254. <td colspan="4">data</td>
  255. <td colspan="4">5</td>
  256. </tr>
  257. </tbody>
  258. </table>
  259. </div>
  260.  
  261. .scrollableContainer {
  262. padding-top:60px;
  263. height: 200px;
  264. position:relative;
  265. }
  266. .scrollArea {
  267. height:100%;
  268. overflow-x:hidden;
  269. overflow-y:auto;
  270. }
  271. table {
  272. border-collapse: collapse;
  273. overflow-x: hidden;
  274. overflow-y: auto;
  275. }
  276.  
  277. td, th {
  278. background: #fff;
  279. border-width: 0;
  280. border-bottom: 1px solid #B8B8B8;
  281. font-weight: normal !important;
  282. padding: 15px;
  283. text-align: left;
  284. vertical-align: middle;
  285. }
  286.  
  287. tr.even {
  288. td, th {
  289. background: #f1f1f1;
  290. }
  291. }
  292.  
  293. thead, tfoot {
  294. text-transform: uppercase;
  295.  
  296. th {
  297. background: #ccc;
  298. }
  299. }
  300.  
  301. body {
  302. color: #111;
  303. font-size: 16px;
  304. font-family: sans-serif;
  305. }
  306.  
  307. $( "table tbody" ).sortable( {
  308. update: function( event, ui ) {
  309. $(this).children().each(function(index) {
  310. $(this).find('td').last().html(index + 1)
  311. });
  312. }
  313. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement