Reputation: 93
does anyone know about a jquery plugin that is able to sort a parent/child tree? for ex:
- Cat 1
child 1
child 2
child 3
- Cat2
child 2-1
child 2-2
i have to sort the child items inside the SAME Cat and save the order to DB with AJAX. Also, i need to sort Cat aswell. In that case, all the child items should follow it's parent Cat. Does anyone know a plugin that does this? Thank you
Upvotes: 0
Views: 2321
Reputation: 251172
There is a jQuery plugin for drag and drop sort...
http://plugins.jquery.com/project/draganddropsort
I'm not sure whether it deals with the tree-view of options or not... I suspect it could if required! It certainly allows you to turn any collection of HTML elements into a sortable section.
Upvotes: 1
Reputation: 86453
Your question is confusing. Do you want to sort the entire list, then resort after you drag and drop a child? There are many answers on sorting, you will have to adapt them to suit your needs:
Upvotes: 1