ScrollTableHeader is a Javascript class that keeps selected rows visible when the user scrolls the page - or in other rows makes the header of a table fixed. It does so intelligently, or in other words, by default it behaves just as you would expect it to.
The code was developed with performance as a priority as it is imperative that if you need such functionality, you are dealing with huge tables - ones that take up more than one screen. Unobtrusiveness and ease of implementation was the second goal. No global variables or functions are declared outside of the ScrollTableHeader class and usage is as simple as it could get.
SEE DEMO
Implementation:
When creating the HTML table, enclose each section of rows in a `
` tag and give it a unique ID.
In most cases you"d be enclosing all rows of the table, but this class supports more tha
基本
文件
流程
错误
SQL
调试
- 请求信息 : 2024-05-09 11:58:29 HTTP/2.0 GET : https://www.bugma.cn/index/dl/96790.html
- 运行时间 : 0.175714s [ 吞吐率:5.69req/s ] 内存消耗:3,894.19kb 文件加载:244
- 查询信息 : 11 queries
- 缓存信息 : 0 reads,0 writes
- 会话信息 : SESSION_ID=c53f13f3b42b8b7576ebb595def0a290
- CONNECT:[ UseTime:0.000949s ] mysql:host=127.0.0.1;port=3306;dbname=www_bugma_cn;charset=utf8mb4
- SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001317s ]
- SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.093786s ]
- SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001586s ]
- SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.003305s ]
- SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001577s ]
- SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.005080s ]
- SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.001002s ]
- SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.003205s ]
- SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.014931s ]
- SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001362s ]
- UPDATE `jrk_articles` SET `hits` = 1 WHERE `id` = 96790 [ RunTime:0.001277s ]
0.177132s