开发者

drag and drop ordering of images

I have 5 images that go into a banner on my homepage. These images are stored in the database but what I would like the user to do is drag and drop them so they retain some order.

What I need to do is a

(i) drag and drop the images in a container div so left if position 1 and right is posi开发者_Go百科tion 5.

(ii) on sumbit save the position as a field in the database.

Some pointers would be nice, probably use jquery if possible.

Thanks.


Use jQuery UI's Sortable and it's associated methods to do a AJAX call to your server on state change.


chk this out: http://jqueryui.com/demos/sortable/#display-grid

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜