dongzhuo6137 2011-07-07 20:43
浏览 49

使用jQuery UI保存可排序列表的排序

I am currently working on a wordpress function which allows users to add links to the side bar of their website (and automatically generates the domain extension based on the users input). I am currently trying to implement jQuery UI's sortable function to allow users to order their links the way they like. The sortable function is working great, however the order will not save once the page is refreshed. I have looked everywhere and it seems that I should be using ajax and some type of update function within the jQuery.

right now I have this:

$(document).ready(function(){
$("tbody#existing").sortable({
helper: fixHelper}).disableSelection();

});

  • 写回答

1条回答 默认 最新

  • doulun1915 2011-07-07 23:27
    关注

    Yes, you need to communicate the item order back to the server and that probably means AJAX. Once the server has this info then it needs to store it someplace (the database), then later it needs to retrieve it, and finally do something useful with it. This puts you squarely in the middle of "plugin development."

    There is (at least) one plugin that does something like this, My Link Order. You could use that, or use it as a learning tool to develop your own plugin.

    Some other pages that may be useful to you:

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP