All Projects → isocra → Tablednd

isocra / Tablednd

Licence: other
jQuery plug-in to drag and drop rows in HTML tables

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tablednd

Sticky Kit
A jQuery plugin for creating smart sticky elements
Stars: ✭ 2,961 (+677.17%)
Mutual labels:  jquery-plugin
Jquery Loading
Easily add and manipulate loading states of any element on the page.
Stars: ✭ 321 (-15.75%)
Mutual labels:  jquery-plugin
Protip
A new generation jQuery Tooltip plugin
Stars: ✭ 357 (-6.3%)
Mutual labels:  jquery-plugin
Texttailor.js
jQuery plugin, tailor made text to fill the height of the parent element or ellipse it if it doesn't fit
Stars: ✭ 291 (-23.62%)
Mutual labels:  jquery-plugin
Tweetie
Simple jQuery Twitter feed plugin
Stars: ✭ 314 (-17.59%)
Mutual labels:  jquery-plugin
Datetimepicker
jQuery Plugin Date and Time Picker
Stars: ✭ 3,402 (+792.91%)
Mutual labels:  jquery-plugin
Selectmenu
Simple, easily and diversity menu solution
Stars: ✭ 284 (-25.46%)
Mutual labels:  jquery-plugin
Jrange
jQuery plugin to create range selector
Stars: ✭ 373 (-2.1%)
Mutual labels:  jquery-plugin
Guillotine
jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
Stars: ✭ 318 (-16.54%)
Mutual labels:  jquery-plugin
Trumbowyg
A lightweight and amazing WYSIWYG JavaScript editor under 10kB
Stars: ✭ 3,664 (+861.68%)
Mutual labels:  jquery-plugin
Waitme
jquery plugin for easy creating loading css3/images animations
Stars: ✭ 302 (-20.73%)
Mutual labels:  jquery-plugin
Perfect Layout
Image layout generator based on linear partitioning
Stars: ✭ 312 (-18.11%)
Mutual labels:  jquery-plugin
Bootstrap Multiselect
JQuery multiselect plugin based on Twitter Bootstrap.
Stars: ✭ 3,507 (+820.47%)
Mutual labels:  jquery-plugin
Stickystack.js
A jQuery plugin that creates a stacking effect by sticking panels as they reach the top of the viewport.
Stars: ✭ 287 (-24.67%)
Mutual labels:  jquery-plugin
Jquery Scrollto
jQuery ScrollTo - Smooth Scrolling to any jQuery/DOM Element
Stars: ✭ 363 (-4.72%)
Mutual labels:  jquery-plugin
Multiselect
jQuery multiselect plugin with two sides. The user can select one or more items and send them to the other side.
Stars: ✭ 285 (-25.2%)
Mutual labels:  jquery-plugin
Jquery Fullscreen Plugin
This jQuery plugin provides a simple to use mechanism to control the new fullscreen mode of modern browsers
Stars: ✭ 327 (-14.17%)
Mutual labels:  jquery-plugin
Hc Sticky
JavaScript library that makes any element on your page visible while you scroll.
Stars: ✭ 375 (-1.57%)
Mutual labels:  jquery-plugin
Material Cards
Card style based on Google Material color palette
Stars: ✭ 370 (-2.89%)
Mutual labels:  jquery-plugin
Bootstrap Suggest Plugin
这是一个基于 bootstrap 按钮式下拉菜单组件的搜索建议插件,必须使用于按钮式下拉菜单组件上。
Stars: ✭ 350 (-8.14%)
Mutual labels:  jquery-plugin

TableDnD

npm version CDNJS version jsDelivr Hits Reviewed by Hound

Installation

TableDnD is easy to install:

npm install --save tablednd

or

yarn add tablednd

or

bower install https://github.com/isocra/TableDnD.git

Alternatively you can simply reference from CDNJS:

<script src="https://cdnjs.cloudflare.com/ajax/libs/TableDnD/0.9.1/jquery.tablednd.js" integrity="sha256-d3rtug+Hg1GZPB7Y/yTcRixO/wlI78+2m08tosoRn7A=" crossorigin="anonymous"></script>

or

<script src="https://cdnjs.cloudflare.com/ajax/libs/TableDnD/0.9.1/jquery.tablednd.js" integrity="sha256-d3rtug+Hg1GZPB7Y/yTcRixO/wlI78+2m08tosoRn7A=" crossorigin="anonymous"></script>

You'll also need to include jQuery before you include this plugin (so that jQuery is defined).


Getting Started

Let's create a simple table. The HTML for the table is very straight forward (no Javascript, pure HTML, we haven't added thead or tbody elements, but it works fine with these too):

<table id="table-1" cellspacing="0" cellpadding="2">
    <tr id="1"><td>1</td><td>One</td><td>some text</td></tr>
    <tr id="2"><td>2</td><td>Two</td><td>some text</td></tr>
    <tr id="3"><td>3</td><td>Three</td><td>some text</td></tr>
    <tr id="4"><td>4</td><td>Four</td><td>some text</td></tr>
    <tr id="5"><td>5</td><td>Five</td><td>some text</td></tr>
    <tr id="6"><td>6</td><td>Six</td><td>some text</td></tr>
</table>

To add in the "draggability" all we need to do is add a line to the $(document).ready(...) function as follows:

<script type="text/javascript">
$(document).ready(function() {
    // Initialise the table
    $("#table-1").tableDnD();
});
</script>

Basically we get the table element and call tableDnD. If you try this, you'll see that the rows are now draggable.

In the example above we're not setting any parameters at all so we get the default settings. There are a number of parameters you can set in order to control the look and feel of the table and also to add custom behaviour on drag or on drop. The parameters are specified as a map in the usual way and are described the full documentation:

You can also play and experiment with TableDnD using this jsFiddle. Here you get the documentation, plus live examples.

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