Code Monkey home page Code Monkey logo

stickyrows's Introduction

stickyRows jQuery plugin

About

jquery.stickyRows is a floating/sticky table rows plugin that supports window and overflow scrolling of multiple rows.

Features

  • The first main difference from other plugins - you can stack any number of rows at the same time
  • Second difference - plugin can handle resize not only window, but any container that you want and redraw without your attention
  • Horizontal and vertical scrolling of window or any container or both
  • Doesn't conflict with your styles
  • Doesn't matter, has row colspan or not

Usage

<table class="table-with-sticky-rows">
  <thead>
    <tr>
        <td>Header1</td>
        <td>Header2</td>
    </tr>
  </thead>
  <tbody>
    <tr>
        <td>Cell1</td>
        <td>Cell2</td>
    </tr>
    <tr>
        <td>Cell1</td>
        <td>Cell2</td>
    </tr>
  </tbody>
</table>
$(function(){
  $('.table-with-sticky-rows').stickyRows();
});

Demo

http://maslianok.github.io/stickyRows/

stickyrows's People

Contributors

maslianok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stickyrows's Issues

HTML5 support

Hello Maslianok,

I found a issue using stickyrows at a HTML5 page. I have a table with multiple heads in between which 'get scrolled' out one by one. It works fine, but only when I remove the HTML5 doctype definition from the document. With HTML5 def it doesn't work. Is this a known problem? Is there a easy way to solve this?

Cheers,
spek

Doctype stopping this from working

Hello

Just to report a bug in this.

It seems that as soon as you use a doctype, the stickyRows no longer stick - remove the doctype and everything works as expected.

Kind regards,

Jeremy

Hi! I'm having bit trouble with stickyRows - does it requires a thead?

Thanks for publishing this code.
I'm trying to use it togheter with GWT (which doesn't generate thead object in html table).
Can I just fix the first row in the tbody element?
Whenever I try to do that, I get a "cannot read property split of undefined" - which leads to the following code:

        // current settings
        this.opts = $.extend(
            {},
            $.StickyRows.opts,
            this.table.$element.data(),
            options
        );

I'll appreciate your help.

Regards,

Edson

Destroy issue

If you use $('.sticky-header').stickyRows('destroy') and then try to re-create the element using $('.sticky-header').stickyRows();, it creates an error.

border-collapse issue

Your plugin is super easy to use and exactly what I'm looking for. However, when I use it on thead with the table having "border-collapse: collapse", it is misaligned with the rest of the table. Also, there are 2-3px borders appearing around the cells in the sticky element that are not being added by me and no amount of overriding seems to be affecting them. It also increases the size of my font. Any ideas on how to address this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.