Fixed width cells with content truncation plugin

Fixed width cells with content truncation plugin

drewtotodrewtoto Posts: 1Questions: 0Answers: 0
edited November 2013 in Plug-ins
I just began prototyping with DataTables to see if it could work as a replacement option in the next generation of the project I'm currently working on. I didn't find the exact functionality I was looking for baked into the core or as an extension/plugin, so I began hacking and came up with this little nugget.

It basically forces each page (of your paginated table) to use non-wrapping, uniform cell widths, with overflowing content to be hidden, but visible as a tooltip upon mouseover.

It's relatively small and simple, and definitely not optimized or broadly tested, but, maybe someone else has a use for it.

Here's a link to the gist: https://gist.github.com/drewtoto/7325776

Replies

  • allanallan Posts: 61,669Questions: 1Answers: 10,096 Site admin
    Fantastic - thanks for posting this!

    Interesting idea setting the cells to float:left! I suspect something similar could be done using `table-layout: fixed` , which is something I've been wanting to integrate fully into DataTables for a while now. It does currently work to an extent - its broadly untested, which is where most of the supporting of that feature will be I suspect!

    Regards,
    Allan
This discussion has been closed.