I created menu.php which loads the menu items from a MySQL database, parses them through a function which creates the code for the menu items which are then displayed in order in an HTML list (tell me if this is confusing and I can post开发者_运维知识库 the code). What I would like to make is an admin page the would allow the user to reorder the menu items, BTW they are sorted by an order column.
thanks in advance :)
edit: The main part where I'm stuck is creating the user interface where the user can shift the menu items around (hopefully drag and drop) and then saving the new order to the database.
I think this is what you are searching for :
http://www.hdeya.com/blog/2009/05/sorting-items-on-the-fly-ajax-using-jquery-ui-sortable-php-mysql/
It uses the jquery sortable plugin.
I would start out with the jQuery UI sortable widget:
http://jqueryui.com/demos/sortable/
精彩评论