views:

419

answers:

4

Hi,

i'm building a website which has a parent-child Paging structure. I'm looking for a convenient way to administrate the website structure.

  • I want the pages to be sortable

Releasing the jQuery sortable code on my generated sitemap (nested UL), doesn't work properly...

$('ul.SiteMap ul').sortable();

What's really important is that it should not be possible to sort outside of the current UL. Any suggestions?

Thanks in advance.

A: 

Not possible, if someone makes it possible please let me know!

Ropstah
A: 

Have you tried with:

items: 'ul > li'

?

You have to list all ULs, though:

$('ul.SiteMap ul, ul.sitemap ul ul, ul.sitemap ul ul ul').sortable({
items: 'ul > li'
});

I am a beginner, so there is perhaps a better option.

Marc
+1  A: 

It works fine for me. I just assigned each ul to be sorted to a class and then did the following: $('.sortableList').sortable();

DPort
A: 

Changing order of children within a parent is easy just give each ul a class '.sort' and do $('.sort').sortable();

I gets a little trickier when changing the parent.

Frank Malina