Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easily create tables with select-able rows, and operations that can be performed on the selected rows.
JavaScript
branch: master
Failed to load latest commit information.
LICENSE Initial
README.md adding demo link
jquery.tableOperations.js Quick form exists fix
tableOperations.jquery.json Update author url

README.md

tableOperations

Easily create tables with select-able rows, and operations that can be performed on the selected rows.

Use

To create an operation table, simply call tableOperations on the table: $('#myTable').tableOperatons(options);

See demo: http://jsfiddle.net/patrickocoffeyo/trtjL/8/

Options

  var options = {
    defaultSelect: 'Select',
    selectClass: 'form-control',
    buttonClass: 'btn btn-default',
    formClass: 'form-inline',
    buttonText: 'Go',
    operations: {
      delete: {
        label: "Delete Selected",
        callback: function($selected) {
          $selected.each(function(index, item) {
            //Operate on item
          });
        }
      },
      save: {
        label: "Save Selected",
        callback: function($selected) {
          $selected.each(function(index, item) {
            //Operate on item
          });
        }
      },
    }
  }

The operations object defines the operations that will be added to the select list above the table. Upon the submition of the operation form, the selected item's callback parameter will be called with a jQuery object of the selected items passed in as the only parameter.

Something went wrong with that request. Please try again.