{"id":17127961,"url":"https://github.com/rohanrhu/jsortable","last_synced_at":"2025-06-19T15:37:28.259Z","repository":{"id":35462984,"uuid":"39730859","full_name":"rohanrhu/jsortable","owner":"rohanrhu","description":"jquery plugin for making sortable elements","archived":false,"fork":false,"pushed_at":"2019-06-07T22:55:17.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T03:43:53.713Z","etag":null,"topics":["sortable","sortable-elements"],"latest_commit_sha":null,"homepage":"https://oguzhaneroglu.com/projects/jsortable/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohanrhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-26T15:44:35.000Z","updated_at":"2020-07-30T12:29:38.000Z","dependencies_parsed_at":"2022-09-24T10:10:59.975Z","dependency_job_id":null,"html_url":"https://github.com/rohanrhu/jsortable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanrhu%2Fjsortable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanrhu%2Fjsortable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanrhu%2Fjsortable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohanrhu%2Fjsortable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohanrhu","download_url":"https://codeload.github.com/rohanrhu/jsortable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245206835,"owners_count":20577583,"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":["sortable","sortable-elements"],"created_at":"2024-10-14T19:05:48.808Z","updated_at":"2025-03-24T04:18:28.330Z","avatar_url":"https://github.com/rohanrhu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsortable\njquery plugin for making sortable elements\n\n## Examples\n\n### Load\n\n```html\n\u003cscript type=\"text/javascript\" src=\"js/jquery-1.11.1.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"js/jquery.event.drag-2.2.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"js/jquery.jsortable.js\"\u003e\u003c/script\u003e\n```\n\n### Vertical\n\n#### HTML\n\n```html\n\u003cdiv class=\"example1\"\u003e\n    \u003cdiv class=\"box1\"\u003e\n        Element 1\n    \u003c/div\u003e\n    \u003cdiv class=\"box1\"\u003e\n        Element 2\n    \u003c/div\u003e\n    \u003cdiv class=\"box1\"\u003e\n        Element 3\n    \u003c/div\u003e\n    \u003cdiv class=\"box1\"\u003e\n        Element 4\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### CSS\n\n```css\n.box1 {\n    width: 500px;\n    background: #505050;\n    text-align: left;\n    color: white;\n    border-radius: 2px;\n    border-bottom: 2px solid rgba(0,0,0,0.2);\n    padding: 10px 10px;\n    cursor: move;\n    font-size: 13px;\n    margin-bottom: 5px;\n    user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n```\n\n#### Javascript\n\n```javascript\nvar $example1 = $('.example1');\n\n$example1.jsortable({\n    mode: $.fn.jsortable.MODE_VERTICAL,\n    sortable: '.box1',\n    show_target_placeholder: true,\n    show_source_placeholder: false\n});\n\n$example1.on('jsortable_updated', function (event) {\n    console.log($example1.jsortable('getElements'));\n});\n```\n\n### Horizontal\n\n#### HTML\n\n```html\n\u003cdiv class=\"example2\"\u003e\n    \u003cdiv class=\"box2\"\u003e\n        Element 1\n    \u003c/div\u003e\n    \u003cdiv class=\"box2\"\u003e\n        Element 2\n    \u003c/div\u003e\n    \u003cdiv class=\"box2\"\u003e\n        Element 3\n    \u003c/div\u003e\n    \u003cdiv class=\"box2\"\u003e\n        Element 4\n    \u003c/div\u003e\n    \u003cdiv class=\"clear\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### CSS\n\n```css\n.box2 {\n    background: #505050;\n    text-align: left;\n    color: white;\n    border-radius: 2px;\n    border-bottom: 2px solid rgba(0,0,0,0.2);\n    padding: 10px 10px;\n    cursor: move;\n    font-size: 13px;\n    margin-bottom: 5px;\n    margin-right: 5px;\n    width: 100px;\n    height: 100px;\n    user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n    float: left;\n}\n```\n\n#### Javascript\n\n```javascript\n$(document).ready(function () {\n    $('.example2').jsortable({\n        mode: $.fn.jsortable.MODE_HORIZONTAL,\n        sortable: '.box2',\n        show_target_placeholder: true,\n        show_source_placeholder: false\n    });\n});\n```\n\n### Events\nThere is one event in jsortable.\n\n#### jsortable_updated\nFires on update queue\n\n##### Example\n\n```javascript\n$example1.on('jsortable_updated', function (event) {\n  console.log($example1.jsortable('getElements'));\n});\n```\n\n### Methods\n\nThere is one method in jsortable.\n\n#### getElements()\nGet jQuery list sortable elements\n\n##### Return\njQuery array object of elements in order.\n\n##### Example\n```javascript\n$example1.jsortable('getElements');\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohanrhu%2Fjsortable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohanrhu%2Fjsortable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohanrhu%2Fjsortable/lists"}