开发者

Jquery to drag items to table cells in google calendar like fashion

In an attempt to create a calendarlike application sort of like this http://arshaw.com/fullcalendar/ or maybe this http://thechriswalker.net/select-drag/ and http://neb.net/playground/dragdrop/

I was wondering what the simples approach to using JQuery is. It seems the pages I've found are sort of expe开发者_如何转开发rimental (except the fullcalendar but the source code for that is 150 kb - ie not a good place to start)


Try the "sortable" plugin for jQuery UI: http://jqueryui.com/demos/sortable/ .

Write some custom stylesheets to make some rectangular <ul>s, and make your events <li>s within them. Then call

jQuery('.sortable').sortable({connectWith: '.sortable'})

and the li elements will be draggable between ul's. Add a little ajax to update on the sortchange() event ( http://jqueryui.com/demos/sortable/#event-change ) and you're all set.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜