jquery fixed header or frozen header method

Source: Internet
Author: User

HTML often encountered in order to put a table header part of the frozen, so that the better experience when browsing, Baidu finished most of the online solutions, advanced Bootstrap and Angularjs no clear solution, Do we Chinese need to fix the table head or freeze the table head? Actually write one also have nothing to do, eacherp in there is a very convenient solution, a function just, use up more convenient.

JavaScript code:

<script>var container= "#grid", var url= "abc.php", var table_title= "serial number, production ticket, dispatch No., date, material id"; var height= "400px";                                    var hidden_cols= "currency_id,warehouse,supplier_id"; cjtable (Container,url,table_title,height,hidden_cols); Table height, need to hide the td</script>

which

Container: Is the ID of the container that contains the table,

URL: Provides the source URL for tabular data, which is in JSON format

Table_title: The text of the table header

Height: Table Heights

Hidden_cols: Which JSON fields do not need to be displayed


users can freely download this JS file, you can directly use it to build a fixed header HTML table. :http://www.eacherp.net The rightgrid.js file after downloading and see the cjtable function.


This article is from the "11027040" blog, please be sure to keep this source http://11037040.blog.51cto.com/11027040/1759021

jquery fixed header or frozen header method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.