最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Order Pictures by dragging and dropping with JQuery - Stack Overflow

programmeradmin2浏览0评论

I have a list of photos retrieved from database and displayed on the html. I would like to create an order feature by allowing the user dragging and placing on other picture position and replacing it.

something similar to the Queue priority from netflix

Is there an JQuery plugin for that? Do I have to develop from scratch?


due Scrooby answer I found exactly what I was looking for see below

I have a list of photos retrieved from database and displayed on the html. I would like to create an order feature by allowing the user dragging and placing on other picture position and replacing it.

something similar to the Queue priority from netflix

Is there an JQuery plugin for that? Do I have to develop from scratch?


due Scrooby answer I found exactly what I was looking for see below

Share Improve this question edited Oct 6, 2012 at 1:12 RollRoll asked Oct 5, 2012 at 20:42 RollRollRollRoll 8,48220 gold badges79 silver badges137 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

You can use jQuery UI Sortable to sort list items:

http://jqueryui./demos/sortable/

Or if you need to sort table rows, you can use:

http://archive.plugins.jquery./project/TableDnD

Each plugin has events that fire when the drag is plete, you can then run an Ajax call to update your database.

Something like the jQuery UI Draggable + Sortable works well and should do the trick.

发布评论

评论列表(0)

  1. 暂无评论