开发者

I want to create a menu editor for my website using PHP and AJAX

开发者 https://www.devze.com 2023-01-14 22:26 出处:网络
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

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号