Merge Adjacent Cells In An HTML Table - jQuery Table-Merger.js

File Size: 6.6 KB
Views Total: 5193
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Merge Adjacent Cells In An HTML Table - jQuery Table-Merger.js

Table-Merger.js is a jQuery plugin which enables you to merge adjacent cells (td) in an HTML table just like the MS Word and MS Excel. Only works on table cells in the same row or column

How to use it:

1. Download and load the Table-Merger.js script after the latest version.

<script src="" 
<script src="table-merger.js"></script>

2. Call the table_merger method on the target html table. This method can be used on any HTML table object to merge cells (td).

<table id="demo">

3. Style the table cells when selected.

td.selected {
  color: rgb(210,118,4);
  border-color: #ff8d00 !important;

4. Style the table cells when hidden.

td.hidden {
  display: none;

5. Add an extra CSS Class to the table cells to be merged.

table_merger('#demo', 'custom-class');

This awesome jQuery plugin is developed by velovsky. For more Advanced Usages, please check the demo page or visit the official website.