All Projects → micc83 → Edittable

micc83 / Edittable

jQuery editTable is a very small jQuery Plugin (~1Kb gzipped) that fill the gap left by the missing of a default input field for data tables.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Edittable

Vue Tables 2
Vue.js 2 grid components
Stars: ✭ 1,518 (+992.09%)
Mutual labels:  datatable
Fotorama
A simple, stunning, powerful jQuery gallery.
Stars: ✭ 1,567 (+1027.34%)
Mutual labels:  jquery-plugin
Jquery.fbmessenger
Fake Facebook Messenger interactions on an iPhone with a simple jQuery plugin!
Stars: ✭ 130 (-6.47%)
Mutual labels:  jquery-plugin
Isonscreen
Simple jQuery plugin to determine if an element is within the viewport
Stars: ✭ 115 (-17.27%)
Mutual labels:  jquery-plugin
Toast
A Bootstrap 4.2+ jQuery plugin for the toast component
Stars: ✭ 121 (-12.95%)
Mutual labels:  jquery-plugin
Jquery Filepond
🔌 A handy FilePond wrapper for jQuery
Stars: ✭ 124 (-10.79%)
Mutual labels:  jquery-plugin
Brickyeditor
WYSIWYG block editor jQuery plugin.
Stars: ✭ 112 (-19.42%)
Mutual labels:  jquery-plugin
Tui.grid
🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
Stars: ✭ 1,859 (+1237.41%)
Mutual labels:  datatable
Xzoom
jQuery Zoom Gallery plugin
Stars: ✭ 120 (-13.67%)
Mutual labels:  jquery-plugin
Checkboxes.js
☑️ A jQuery plugin that gives you nice powers over your checkboxes.
Stars: ✭ 127 (-8.63%)
Mutual labels:  jquery-plugin
Articulate.js
A jQuery plugin that lets the browser speak to you.
Stars: ✭ 116 (-16.55%)
Mutual labels:  jquery-plugin
Vue Datatables Net
Vue jQuery DataTables.net wrapper component
Stars: ✭ 119 (-14.39%)
Mutual labels:  datatable
Jquery Ajaxy
jQuery Ajaxy aims at solving complicated AJAX Paradigms by providing you with a easy managed solution to bind into page state (URL Hash) changes, AJAX form submits, and support AJAX links
Stars: ✭ 125 (-10.07%)
Mutual labels:  jquery-plugin
Jquery Rwdimagemaps
Responsive Image Maps jQuery Plugin
Stars: ✭ 1,511 (+987.05%)
Mutual labels:  jquery-plugin
Vue Good Table
An easy to use powerful data table for vuejs with advanced customizations including sorting, column filtering, pagination, grouping etc
Stars: ✭ 1,824 (+1212.23%)
Mutual labels:  datatable
Slickquiz
A jQuery plugin for creating pretty, dynamic quizzes.
Stars: ✭ 112 (-19.42%)
Mutual labels:  jquery-plugin
Jquery Syntaxhighlighter
jQuery Extension for Google's Prettify Syntax Highlighter
Stars: ✭ 123 (-11.51%)
Mutual labels:  jquery-plugin
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+1177.7%)
Mutual labels:  jquery-plugin
Slide And Swipe Menu
⚡️ A sliding swipe menu that works with touchSwipe library.
Stars: ✭ 135 (-2.88%)
Mutual labels:  jquery-plugin
Distpicker
⚠️ [Deprecated] No longer maintained. A simple jQuery plugin for picking provinces, cities and districts of China. (中国 / 省市区 / 三级联动 / 地址选择器)
Stars: ✭ 1,608 (+1056.83%)
Mutual labels:  jquery-plugin

jQuery editTable

jQuery editTable is a very small jQuery Plugin (~1Kb gzipped) that fill the gap left by the missing of a default input field for data tables. jQuery editTable can be used both in ajax and/or HTTP POST contest and let you preset the title and number of columns or just let complete freedom to the user. You can even append custom behaviors to single column cells (ex. jQuery UI Datepicker). The only limit is your imagination! :)

To use it you just have to include jQuery and a copy of the plugin in your head or footer:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="jquery.edittable.min.js"></script>
<link rel="stylesheet" href="jquery.edittable.min.css">

Now you can trigger editTable on any textarea or block element (ex. div, article, section ...). In case you trigger it on a textarea, its content will be used as JSON source for the table. If the textarea is inside a form, on submit, its content will be updated with the new JSON data. Otherwise, if you trigger it on a block element the table will be appended to the element itself (ajax).

var mytable = $('#edittable').editTable({
    data: [['']],           // Fill the table with a js array (this is overridden by the textarea content if not empty)
    tableClass: 'inputtable',   // Table class, for styling
    jsonData: false,        // Fill the table with json data (this will override data property)
    headerCols: false,      // Fix columns number and names (array of column names)
    maxRows: 999,           // Max number of rows which can be added
    first_row: true,        // First row should be highlighted?
    row_template: false,    // An array of column types set in field_templates
    field_templates: false, // An array of custom field type objects

    // Validate fields
    validate_field: function (col_id, value, col_type, $element) {
        return true;
    }
});

There are of course many methods which can be used on the created table. Let's see...

mytable.loadData(dataArray);    // Fill the table with js data
mytable.loadJsonData(jsonData); // Fill the table with JSON data
mytable.getData();              // Get a js array of the table data
mytable.getJsonData();          // Get JSON from the table data
mytable.reset();                // Reset the table to the initial set of data
mytable.isValidated()           // Check if the table pass validation set with validate_field

To define a custom field type object:

[
    'checkbox' : {

        html: '<input type="checkbox">',     // Input type html

        // How to get the value from the custom input
        getValue: function (input) {
            return $(input).is(':checked');
        },

        // How to set the value of the custom input
        setValue: function (input, value) {
            if ( value ){
                return $(input).attr('checked', true);
            }
            return $(input).removeAttr('checked');
        }
    }
]

That's it, now give a look to the examples to understand how it works.

Credits and contacts

ReStable has been made by [email protected] or twitter for any issue or feauture request.

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].