Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calebhearth/full-row-select
Über lightweight jQuery tool to implement full row select on tables
https://github.com/calebhearth/full-row-select
Last synced: 27 days ago
JSON representation
Über lightweight jQuery tool to implement full row select on tables
- Host: GitHub
- URL: https://github.com/calebhearth/full-row-select
- Owner: calebhearth
- Created: 2011-12-19T22:13:46.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-20T18:19:15.000Z (about 13 years ago)
- Last Synced: 2024-10-15T19:43:41.743Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To use Full Row Select, simply add the following to your html:
$('#element-id').fullRowSelect();
You may want to do this after the document has loaded:
$(document).ready(function() {
$('#element-id').fullRowSelect();
});Your table should have two rows allotted to each data row.
The first is constructed like any other table, with cells corresponding to
the header's cells. The second row should have its colspan attribute set to
the number of columns in the table, and contains a single cell with whatever
content it is that you would like to be shown on click. This can include
images, links, videos, whatever.
Anything that can be inside a table can be in the one cell.
[extra content lives here]
Excluding the header, every even numbered row will be hidden.
Odd rows will have the class 'collapsed' and a click event added.
When the .collapsed rows are clicked, they will toggle the hidden attribute
of the next row, and the class .uncollapsed will be toggled on the row
clicked.Because of the click event, links do not function properly. The click on the
link will trigger toggling the hidden attribute of the child row, then the
link will load. A patch to fix this would be appreciated, as it is not
important enough to me right now to fix this functionality.