{"_id":"nestable","_rev":"4-395ab97d4159238df5d5c05ce3c7ca7e","name":"nestable","description":"Drag & drop hierarchical list with mouse and touch compatibility (jQuery plugin)","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"nestable","version":"0.2.0","description":"Drag & drop hierarchical list with mouse and touch compatibility (jQuery plugin)","main":"jquery.nestable.js","scripts":{},"repository":{"type":"git","url":"git+https://github.com/dbushell/Nestable.git"},"license":"ISC","peerDependencies":{},"dependencies":{},"devDependencies":{},"keywords":[],"bugs":{"url":"https://github.com/dbushell/Nestable/issues"},"homepage":"https://github.com/dbushell/Nestable#readme","_id":"nestable@0.2.0","_shasum":"9bbe45e51f6135fc3fb0845fdf6b10167a70009c","_from":".","_npmVersion":"2.14.3","_nodeVersion":"0.12.7","_npmUser":{"name":"luqin","email":"h-io@qq.com"},"dist":{"shasum":"9bbe45e51f6135fc3fb0845fdf6b10167a70009c","tarball":"https://registry.npmjs.org/nestable/-/nestable-0.2.0.tgz","integrity":"sha512-UbNVe3Dr8ufdoj0gV/DjAmohaOCYG5cYvR30rjaQH2iQdXeVqg51u/frtScj3K/wANio5KSR1Si4VMy0LCzVGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDm9azsxOS/Dr/qA/y14NYeYmbuvOmRCjg6qVN4anr6gAIgJ5D7zVeNjM5vJB0tJW5OMqjjDpjgiAmO/+D/LmFnZY0="}]},"maintainers":[{"name":"luqin","email":"h-io@qq.com"}]}},"readme":"Nestable\n========\n\n## PLEASE NOTE\n\n**I cannot provide any support or guidance beyond this README. If this code helps you that's great but I have no plans to develop Nestable beyond this demo (it's not a final product and has limited functionality). I cannot reply to any requests for help.**\n\n* * *\n\n### Drag & drop hierarchical list with mouse and touch compatibility (jQuery / Zepto plugin)\n\n[**Try Nestable Demo**](http://dbushell.github.com/Nestable/)\n\nNestable is an experimental example and not under active development. If it suits your requirements feel free to expand upon it!\n\n## Usage\n\nWrite your nested HTML lists like so:\n\n    <div class=\"dd\">\n        <ol class=\"dd-list\">\n            <li class=\"dd-item\" data-id=\"1\">\n                <div class=\"dd-handle\">Item 1</div>\n            </li>\n            <li class=\"dd-item\" data-id=\"2\">\n                <div class=\"dd-handle\">Item 2</div>\n            </li>\n            <li class=\"dd-item\" data-id=\"3\">\n                <div class=\"dd-handle\">Item 3</div>\n                <ol class=\"dd-list\">\n                    <li class=\"dd-item\" data-id=\"4\">\n                        <div class=\"dd-handle\">Item 4</div>\n                    </li>\n                    <li class=\"dd-item\" data-id=\"5\">\n                        <div class=\"dd-handle\">Item 5</div>\n                    </li>\n                </ol>\n            </li>\n        </ol>\n    </div>\n\nThen activate with jQuery like so:\n\n    $('.dd').nestable({ /* config options */ });\n\n### Events\n\nThe `change` event is fired when items are reordered.\n\n    $('.dd').on('change', function() {\n        /* on change event */\n    });\n\n### Methods\n\nYou can get a serialised object with all `data-*` attributes for each item.\n\n    $('.dd').nestable('serialize');\n\nThe serialised JSON for the example above would be:\n\n    [{\"id\":1},{\"id\":2},{\"id\":3,\"children\":[{\"id\":4},{\"id\":5}]}]\n\n### Configuration\n\nYou can change the follow options:\n\n* `maxDepth` number of levels an item can be nested (default `5`)\n* `group` group ID to allow dragging between lists (default `0`)\n\nThese advanced config options are also available:\n\n* `listNodeName` The HTML element to create for lists (default `'ol'`)\n* `itemNodeName` The HTML element to create for list items (default `'li'`)\n* `rootClass` The class of the root element `.nestable()` was used on (default `'dd'`)\n* `listClass` The class of all list elements (default `'dd-list'`)\n* `itemClass` The class of all list item elements (default `'dd-item'`)\n* `dragClass` The class applied to the list element that is being dragged (default `'dd-dragel'`)\n* `handleClass` The class of the content element inside each list item (default `'dd-handle'`)\n* `collapsedClass` The class applied to lists that have been collapsed (default `'dd-collapsed'`)\n* `placeClass` The class of the placeholder element (default `'dd-placeholder'`)\n* `emptyClass` The class used for empty list placeholder elements (default `'dd-empty'`)\n* `expandBtnHTML` The HTML text used to generate a list item expand button (default `'<button data-action=\"expand\">Expand></button>'`)\n* `collapseBtnHTML` The HTML text used to generate a list item collapse button (default `'<button data-action=\"collapse\">Collapse</button>'`)\n\n**Inspect the [Nestable Demo](http://dbushell.github.com/Nestable/) for guidance.**\n\n## Change Log\n\n### 15th October 2012\n\n* Merge for Zepto.js support\n* Merge fix for remove/detach items\n\n### 27th June 2012\n\n* Added `maxDepth` option (default to 5)\n* Added empty placeholder\n* Updated CSS class structure with options for `listClass` and `itemClass`.\n* Fixed to allow drag and drop between multiple Nestable instances (off by default).\n* Added `group` option to enabled the above.\n\n* * *\n\nAuthor: David Bushell [http://dbushell.com](http://dbushell.com/) [@dbushell](http://twitter.com/dbushell/)\n\nCopyright © 2012 David Bushell | BSD & MIT license\n","maintainers":[{"name":"luqin","email":"h-io@qq.com"}],"time":{"modified":"2022-06-21T00:35:01.920Z","created":"2015-12-31T07:54:53.368Z","0.2.0":"2015-12-31T07:54:53.368Z"},"homepage":"https://github.com/dbushell/Nestable#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/dbushell/Nestable.git"},"bugs":{"url":"https://github.com/dbushell/Nestable/issues"},"license":"ISC","readmeFilename":"README.md","users":{"envpoint":true}}