Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

jquery drag and sort

Posted on 2009-12-21
7
Medium Priority
?
745 Views
Last Modified: 2012-05-08
Hi, we're developing an online store. In this site we will have a tree kind of categories, i.e. we will have categories, with sub categories etc etc so basically there's going to be an unlimited number of levels in this child-parent relation.

See attached image to have a better idea of the tree of categories.

We need a JQuery kind of friendly module for the backend (CMS) that will help the website admin manage these category tree in a very user-friendly way, preferrably by drag-and-drop.

Any suggestions, snippets, where can we get this from??

Thanks

category-tree.jpg
0
Comment
Question by:Gagik
  • 4
  • 3
7 Comments
 
LVL 10

Expert Comment

by:Terry_focus
ID: 26103073
Hi,

There is this feature as part of jQuery UI, this example shows you how to drag and sort list items

http://jqueryui.com/demos/draggable/#sortable
0
 

Author Comment

by:Gagik
ID: 26106028
Yes but here you don`t have different levels, I mean no tree-view if you know what i mean. So this one doesn`t work
0
 
LVL 10

Expert Comment

by:Terry_focus
ID: 26106221
Hi,

I understand, but can you not just nested ul tags, So only items in one list can be sorted?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Gagik
ID: 26110306
I see get your point but this is not enough for us. We really need a tree sorting. Look at the attached picture - this is exactly how we need it. So not only sort horizontally but we also need to be able to kind of move them to the right one nutch at a time in order to link it to the previous item which will become the parent.
Untitled-1.jpg
0
 
LVL 10

Expert Comment

by:Terry_focus
ID: 26111216
Hi,

I can't see a pre-made plugin that would do this for, they're plenty of badly made scripts but I can't see anything that looks well tested.

I think you can achieve what you need using the 'connectToSortable' feature to link lists. If you up the points I'll have go at an example for you.
0
 

Accepted Solution

by:
Gagik earned 0 total points
ID: 26114391
0
 
LVL 10

Expert Comment

by:Terry_focus
ID: 26115098
Yeah, that would do it, looks well done.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question