Jquery Table Is Responsive For Multiple Purposes | JS Irontable

JSIronTable is a jQuery-based dynamic table generator plug-in that provides an easy way to add a sortable and draggable spreadsheet to your web application.

This table provides a responsive JQuery table which includes:

  • Column Sort
  • Fixed head
  • Dynamic data
  • Custom column width
  • Rearrange the column
  • 2D support for automatically generating rows and columns

How to make use of it:

1. Load the jQuery library along with the JSIronTable plugin within the HTML web page.

<link rel="stylesheet" href="/path/to/src/jsirontable.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/src/jsirontable.js"></script>

2. Load the most recent jQuery UI framework for the help of drag and drop performance.

<link rel="stylesheet" href="/path/to/cdn/jquery-ui.min.css" />
<script src="/path/to/cdn/jquery-ui.min.js"></script>

3. Create a placeholder for the info table.

<div class="jsirontable"></div>

4. Define your tabular data to be introduced within the data table.

var songs = [
    {
      id: "s1",
      artist:"Radiohead",
      title:"Bloom",
      isnew: 0,
      duration:180,
      bpm:15,   
      test: "40",
      path: "http://api.audiotool.com/track/volution/play.mp3",
      actions:""
    },
    {
      id: "s2",
      artist:"Radiohead",
      title:"Paranoid",
      isnew: 0,
      duration:200,
      bpm:165,   
      test: "10",
      path: "http://api.audiotool.com/track/volution/play.mp3",
      actions:""
    },
    {
      id: "s3",
      artist:"Radiohead",
      title:"Let Down",
      isnew: 1,
      duration:190,
      bpm:160,   
      test: "300",
      path: "http://api.audiotool.com/track/volution/play.mp3",
      actions:""
    }
    // ...
];

5. Initialize the plugin to render the info within the table and outline the header data as follows:

var irontable = $('.jsirontable').JSIronTable({
    data: songs,
    columns: [
      { title: "ID", datafield: "id", visible: true, width: "10%" },        
      { title: "Title", datafield: "title", width: "100px", datafields: [{key: "data-translate", value: "{{lang.main.title}}"}] },
      { title: "Is New", datafield: "isnew", width: "10%" },
      { title: "Duration", datafield: "duration" },
      { title: "Artist", datafield: "artist" },
      { title: "Bpm", datafield: "bpm" },        
      { title: "Test", datafield: "test" },        
      { title: "Path", datafield: "path", visible: false },
      { 
        title: "Actions", 
        datafield: "actions", 
        view: function ( data ) { 
          return '<a href="javascript:ClickActionBtn(\''+data.id+'\');" class="action_icon action_icon_edit">Delete Forever</a>' 
        }
      },
    ]
});

6. Specify the max peak of the info table and decide whether or not or to not allow the scrollable performance.

var irontable = $('.jsirontable').JSIronTable({
    maxHeight: 300,
    scrollable: true,
    fitHeight: true
});

7. Determine whether or not or to not allow the Sortable and Draggable functionalities.

var irontable = $('.jsirontable').JSIronTable({
    sortable: true,
    draggableColumns: true
});

8. Specify the font dimension.

var irontable = $('.jsirontable').JSIronTable({
    headerfontsize: "14px",
    cellfontsize: "14px"
});

9. Determine whether or not to repair the table header to the highest.

var irontable = $('.jsirontable').JSIronTable({
    fixedheader: true
});

10. All default plugin choices.

var irontable = $('.jsirontable').JSIronTable({
    data: [],
    fitHeight: false,
    maxHeight: 0,
    fixedheader: true,
    scrollable: true,
    sortable: false,
    draggableColumns: false,
    headerfontsize: "12pt",
    cellfontsize: "12pt",
    columns: [],
    rows: [],
    headercells: [],
    columnfields: []
});

11. Available occasion handlers.

irontable.OnInitialized(function()
{
  // do something   
});

irontable.OnError(function(error)
{
  // do something   
});

irontable.OnReload(function()
{
  // do something   
});

irontable.OnSort(function()
{
  // do something   
});

irontable.BeforeSort(function()
{
  // do something   
});

Sortable Draggable Dynamic Table Plugin, JS IronTable Github


See Demo And Download

Official Website(raftopyannis): Click Here

This superior jQuery/javascript plugin is developed by raftopyannis. For extra Advanced Usages, please go to the official website.

Related Posts

Vector-Graphs-smartGraph

Generating Beautiful Vector Graphs With jQuery | smartGraph

SmartGraph is a free and easy-to-use JavaScript library to create beautiful vector diagrams with many customizations. This plugin allows developers to create dynamic, responsive, draggable vector graphics…

vue-image-slider-transition

Image Slider With 20 Cool Transitions Component | vue-flux

Vue flux is an image slider developed with Vuejs 2 that comes with 20+ nice transitions out of the box. Included transitions 2D transitions Fade: Fades from…

simple-parallax-scrolling

Simple background Image Parallax Scroll Plugin In jQuery

Background parallax effect is a simple jQuery background image without any library. Uses jQuery’s scroll() function to track the scroll event and applies the exact parallax scroll…

bootstrap-color-picker-plugin

Modular Color Picker Plugin for Bootstrap | BS Colorpicker

Bootstrap Colorpicker is a standard color picker plugin for Bootstrap 4. Colorpicker Plugin for Bootstrap 5/4/3 frameworks that allow you to add a color picker to an…

gdpr-iframe-manager-js

GDPR Friendly iFrame Manager In Vanilla JS | iframemanager

IframeMananger is a lightweight JavaScript plug-in that helps you to comply with GDPR by completely removing iframes at first and setting a notice related to that service….

diagonal-slider-anime-js

Diagonal Thumbnails Carousel Slider | Anime.js

Diagonal Slider is a cool mini carousel made with Anime.js JavaScript library. It takes a bunch of pictures and turns them into a circular user interface where…