javascript - How to create a Scrollable Table in Google Chrome -
OK, this is basically about the scrollable table.
If I have a table element then I scroll through the content (with some javascript fun, using the width, with access to the scroll bar using the width), making a certain height and the height of the tibb You can set up, then set scrolling on auto to Tony.
This works Firefox, but in Google Chrome the heights are ignored on thead / tbody and want to scroll through the whole table versus.
Is there a CSS solution that can be applied to the table to create this task in Chrome as well? Or do I need to create a table of headers, body is a separate table, make sure the column width using JS or CSS and scroll the body table with its contents?
Here is a complete solution, that should be working (using) of two tables in each one There will be a separate division element in the same table in each table. Only the content section will have tabs section
Value 1 & lt; / Td> & Lt; Td> Value 2 & lt; / Td> & Lt; Td> Value 3 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Value 4 & lt; / Td> & Lt; Td> Value 5 & lt; / Td> & Lt; Td> Value 6 & lt; / Td> & Lt; / TR & gt; .... & lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt; & Lt; / Div & gt;
Then, every time you change the data, you will need to call this function:
ResizeWidths ($ (scrollableTable ')); Function ResizeWidths (div) {var headerCells = $ (div) Find ('. HeaderTable thead'). Find ('th'); Var contentCells = $ (div) Find ('. ContentTable thead'). Find ('th'); (Var i = 0, ii = headerCells.length; i & lt; ii; i ++) {if ($ (headercells [i]) width ()! = $ (ContentCells [i]). Width () ) $ (Headersils. [I]) width ($ (contentCells [i]) width ()). }}
Comments
Post a Comment