{"id":13575870,"url":"https://github.com/isocra/TableDnD","last_synced_at":"2025-04-04T23:30:55.144Z","repository":{"id":415172,"uuid":"2301605","full_name":"isocra/TableDnD","owner":"isocra","description":"jQuery plug-in to drag and drop rows in HTML tables","archived":false,"fork":false,"pushed_at":"2025-01-24T05:55:47.000Z","size":552,"stargazers_count":401,"open_issues_count":42,"forks_count":370,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-24T07:17:59.681Z","etag":null,"topics":["html","javascript","jquery-plugin"],"latest_commit_sha":null,"homepage":"http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isocra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-08-31T13:18:42.000Z","updated_at":"2025-01-10T20:21:10.000Z","dependencies_parsed_at":"2023-07-05T15:01:06.797Z","dependency_job_id":"3c770420-f747-428b-84a5-173264d3e4ec","html_url":"https://github.com/isocra/TableDnD","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isocra%2FTableDnD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isocra%2FTableDnD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isocra%2FTableDnD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isocra%2FTableDnD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isocra","download_url":"https://codeload.github.com/isocra/TableDnD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266474,"owners_count":20910831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","javascript","jquery-plugin"],"created_at":"2024-08-01T15:01:04.963Z","updated_at":"2025-04-04T23:30:51.024Z","avatar_url":"https://github.com/isocra.png","language":"HTML","funding_links":[],"categories":["HTML","Table of contents"],"sub_categories":["Data Table"],"readme":"# TableDnD\n[![npm version](https://badge.fury.io/js/tablednd.svg)](https://badge.fury.io/js/tablednd)\n[![CDNJS version](https://img.shields.io/cdnjs/v/TableDnD.svg)](https://cdnjs.com/libraries/TableDnD)\n[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/gh/isocra/TableDnD/badge?style=rounded)](https://www.jsdelivr.com/package/gh/isocra/TableDnD)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n\n## Installation\n\nTableDnD is easy to install:\n```\nnpm install --save tablednd\n```\nor\n```\nyarn add tablednd\n```\nor\n```\nbower install https://github.com/isocra/TableDnD.git\n```\nAlternatively you can simply reference from CDNJS:\n```html\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/TableDnD/0.9.1/jquery.tablednd.js\" integrity=\"sha256-d3rtug+Hg1GZPB7Y/yTcRixO/wlI78+2m08tosoRn7A=\" crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n```\nor\n```html\n\u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/TableDnD/0.9.1/jquery.tablednd.js\" integrity=\"sha256-d3rtug+Hg1GZPB7Y/yTcRixO/wlI78+2m08tosoRn7A=\" crossorigin=\"anonymous\"\u003e\u003c/script\u003e\n```\nYou'll also need to include [jQuery](https://jquery.com) before you include this plugin (so that jQuery is defined).\n\n---\n\n## Getting Started\n\nLet'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):\n\n```html\n\u003ctable id=\"table-1\" cellspacing=\"0\" cellpadding=\"2\"\u003e\n    \u003ctr id=\"1\"\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003eOne\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr id=\"2\"\u003e\u003ctd\u003e2\u003c/td\u003e\u003ctd\u003eTwo\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr id=\"3\"\u003e\u003ctd\u003e3\u003c/td\u003e\u003ctd\u003eThree\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr id=\"4\"\u003e\u003ctd\u003e4\u003c/td\u003e\u003ctd\u003eFour\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr id=\"5\"\u003e\u003ctd\u003e5\u003c/td\u003e\u003ctd\u003eFive\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr id=\"6\"\u003e\u003ctd\u003e6\u003c/td\u003e\u003ctd\u003eSix\u003c/td\u003e\u003ctd\u003esome text\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n```\nTo add in the \"draggability\" all we need to do is add a line to the `$(document).ready(...)` function as follows:\n```html\n\u003cscript type=\"text/javascript\"\u003e\n$(document).ready(function() {\n    // Initialise the table\n    $(\"#table-1\").tableDnD();\n});\n\u003c/script\u003e\n```\nBasically we get the table element and call `tableDnD`. If you try this, you'll see that the rows are now draggable.\n\nIn 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](http://isocra.github.io/TableDnD):\n\nYou can also play and experiment with TableDnD using this [jsFiddle](http://jsfiddle.net/DenisHo/dxpLrcd9/embedded/result/). Here you get the documentation, plus live examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisocra%2FTableDnD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisocra%2FTableDnD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisocra%2FTableDnD/lists"}