All Projects → yidas → Jquery Freeze Table

yidas / Jquery Freeze Table

Licence: mit
RWD Table with freezing head and columns for jQuery

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Jquery Freeze Table

Awesome Grid
A curated list of grid(table) libraries and resources that developers may find useful.
Stars: ✭ 1,142 (+1275.9%)
Mutual labels:  jquery
Yishaadmin
基于 .NET Core MVC 的权限管理系统,代码易读易懂、界面简洁美观。演示版 http://106.14.124.170/admin
Stars: ✭ 1,186 (+1328.92%)
Mutual labels:  jquery
Applozic Web Plugin
Javascript (jQuery) Real Time Chat & Messaging plugin
Stars: ✭ 76 (-8.43%)
Mutual labels:  jquery
Pockethold
Install Flarum without SSH/composer access.
Stars: ✭ 69 (-16.87%)
Mutual labels:  jquery
Blog By Nodejs
NodeJs + Mongoose + Express + jQuery + BootStrap + Ejs + Webpack搭建多人博客
Stars: ✭ 72 (-13.25%)
Mutual labels:  jquery
Jquery.toaster
jQuery plugin for displaying customizable toast notifications via Bootstrap alerts
Stars: ✭ 74 (-10.84%)
Mutual labels:  jquery
On Screen Keyboard
A jQuery plug-in which provides users with a fluid-width on-screen keyboard.
Stars: ✭ 63 (-24.1%)
Mutual labels:  jquery
Student Homework Management System
使用SSM+Shiro开发的学生作业管理系统。支持批量打包下载,QQ登陆等功能 生产版:
Stars: ✭ 79 (-4.82%)
Mutual labels:  jquery
Jalert
jQuery alert/modal/lightbox plugin
Stars: ✭ 73 (-12.05%)
Mutual labels:  jquery
Osmium
Online collaborative fitting tool.
Stars: ✭ 74 (-10.84%)
Mutual labels:  jquery
Jquery Lockfixed
jQuery lockfixed plugin
Stars: ✭ 69 (-16.87%)
Mutual labels:  jquery
Minecraft Rcon
Minecraft RCON Web (using PHP) Console
Stars: ✭ 70 (-15.66%)
Mutual labels:  jquery
Floatthead
Fixed <thead>. Doesn't need any custom css/html. Does what position:sticky can't
Stars: ✭ 1,193 (+1337.35%)
Mutual labels:  jquery
Jtap
Tap Event for jQuery
Stars: ✭ 65 (-21.69%)
Mutual labels:  jquery
Gitmessenger
GitMessenger is github chat app built with socket.io , firebase, nodejs and bootstrap where developers can share code,images and much more 😊
Stars: ✭ 78 (-6.02%)
Mutual labels:  jquery
Vue
Stars: ✭ 65 (-21.69%)
Mutual labels:  jquery
Curso Sistemas Web Com Spring Javascript Bootstrap
Stars: ✭ 74 (-10.84%)
Mutual labels:  jquery
Jquery Mosaic
A jQuery plugin to build responsive mosaics of images or any other content fitted to match heights in multiple rows while maintaining aspect ratios. http://jquery-mosaic.tin.cat
Stars: ✭ 80 (-3.61%)
Mutual labels:  jquery
Olog
📔 Online Note-Taking Experience | 即时灵感笔记记录平台
Stars: ✭ 79 (-4.82%)
Mutual labels:  jquery
Swiftype Search Jquery
Elastic Site Search jQuery search plugin
Stars: ✭ 74 (-10.84%)
Mutual labels:  jquery

RWD Freeze Table


npm version License

RWD Table with freezing head and columns for jQuery

FEATURES

  • Freeze the head rows and columns for large table with RWD

  • Optional features such as Freeze Scroll Bar

  • Namespace support for multiple tables


OUTLINE


DEMONSTRATION

https://yidas.github.io/jquery-freeze-table/


REQUIREMENTS

This library requires the following:

  • jQuery 1.11.0+ | 2.0+ | 3.0+

INSTALLATION

Bower Installation

bower install jquery-freeze-table

You could also download by NPM or directly copy dist assets.

Assets include

Add JavaScript file either to the <head>, or to the bottom of <body>

<script type="text/javascript" src="dist/js/freeze-table.js"></script>

Markup

Add the classes .table to the tables as usual when using Bootstrap, then wrap them with a identity such as .freeze-table

<div class="freeze-table">
  <table class="table">
    <thead>
      <th>...</th>
    </thead>
    <tbody>
      <td>...</td>
    <tbody>
  </table>
</div>

Initialize via JavaScript

You can initialize Freeze Table by jQuery extension call:

<script>
   $(function() {
      $('.freeze-table').freezeTable({});
   });
</script>

Or initialize an element by newing object from Freeze Table class:

<script>
   $(function() {
      new FreezeTable('.freeze-table', {});
   });
</script>

The parameter {} is options configuration

Options

Options could be passed via JavaScript with object.

Name Type Default Description
freezeHead boolean true Enable to freeze <thead>
freezeColumn boolean true Enable to freeze column(s)
freezeColumnHead boolean true Enable to freeze column(s) head (Entire column)
scrollBar boolean false Enable fixed scrollBar for X axis
fixedNavbar string|jQuery|Element '.navbar-fixed-top' Fixed navbar deviation consideration. Example: '#navbar'
scrollable boolean false Enable Scrollable mode for inner scroll Y axis
fastMode boolean false Enable Fast mode for better performance but less accuracy
namespace string 'freeze-table' Table namespace for unbind
container string|jQuery|Element false Specify a document role element that contains the table. Default container is window. This option is particularly useful in that it allows you to position the table in the flow of the document near the triggering element - which will make the freeze table support in containers such as Bootstrap Modal. Example: '#myModal'
columnNum integer 1 The number of column(s) for freeze
columnKeep boolean false Freeze column(s) will always be displayed to support interactive table
columnBorderWidth interger 1 The addon border width for freeze column(s)
columnWrapStyles object null Customized CSS styles for freeze column(s) wrap. {'style': 'value'}
headWrapStyles object null Customized CSS styles for freeze head(s) wrap. {'style': 'value'}
columnHeadWrapStyles object null Customized CSS styles for freeze column-head wrap. {'style': 'value'}
callback function null Plugin after initialization callback function
shadow boolean false Enable default box-shadow UI
backgroundColor string|boolean 'white' Default table background color for Boostrap transparent UI. white, #FFFFFF, rgb(255,255,255,1), or false to skip.

IMPLEMENTATION

Resize

There is an resize method which you can call when the page container has changed but not triggering window resize. The method will resize Freeze Table to ensure the size fits.

$('.freeze-table').freezeTable('resize');

Or using API usage to update:

var freezeTable = new FreezeTable('.freeze-table', {'namespace': 'first-table'});
// Resize Freeze Table while the page container is distorted
$('.sider-bar-switch').click(function () {
   freezeTable.resize();
});

Trigger $(window).resize() will also work for every Freeze Table.

Update for Dynamic Content

There is an update method which you can call when the table or it's contents has changed. The method will reinitialze Freeze Table to ensure that everything is alright with the same options.

$('.freeze-table').freezeTable('update');

Or using API usage to update:

var freezeTable = new FreezeTable('.freeze-table', {'namespace': 'first-table'});
// Update Freeze Table while the original table is distorted
$('.freeze-table > table .btn-expand').click(function () {
   freezeTable.update();
});

Namespace

To destroy or update Freeze Tables, it's recommended to define namespaces to each Freeze Table so that they could able to destroy itself.

Namespace has default value which Freeze Tables with same namespace would affect each other.

$("#table-first").freezeTable({
  'namespace': 'table-first',
});

Table Opacity

Bootstrap sets table's background-color as transparent by default, so that you may need to define backgroundColor option for your own page:

$(".table-black").freezeTable({
  'backgroundColor': 'rgb(0,0,0,1)',
});

API USAGE

resize()

Resize trigger for current same namespace

See Resize

update()

Update for Dynamic Content

See Update for Dynamic Content

destroy()

Destroy Freeze Table by same namespace

unbind()

Unbind all events by same namespace


Finally, I hope that you guys will like this library and enjoy it, and I want to thanks for all your RECOMMENDATIONS.

Other kit reference:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].