jquery - Fixed first row in a table -


this question has answer here:

i have website created software. on page have table this:

<table>     <tbody>         <tr id="header">             <th>header1             <th>header2             <th>header3         <tr>             <td>info1             <td>info2             <td>info3         <tr>             <td>info4             <td>info5             <td>info6 

dont ask me how works without closing tags does. want have first row "<tr id="header">" fixed when scroll down page or within page if possible.

i found many solutions asking <thead> , that, can work have...

im pretty sure jquery can im starting out jquery...

you can add simple css page:

tr#header {     position: fixed;     } td {     position: relative;     top: 25px;     display: inline-block;     } 

or it's possible use jquery fixed table:

<script src="jquery.fixedtableheader.min.js" type="text/javascript"> </script> <script type="text/javascript">      $(document).ready(function() {          $('.tbl').fixedtableheader();      });  </script> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -