【问题标题】:Change the display order of the script "jQuery-File-Upload"更改脚本“jQuery-File-Upload”的显示顺序
【发布时间】:2013-09-13 09:03:34
【问题描述】:

我正在使用这个script

效果很好,但我想通过将最后一张图片放在列表的开头而不是底部来对结果进行排序。作为 MySql ORDER BY.... 谁能帮我? 谢谢

【问题讨论】:

  • MySql ORDER BY 是什么意思?
  • 只是一个例子来了解我想要什么

标签: jquery mysql file-upload


【解决方案1】:

好消息!它作为可配置选项内置于功能中。这样做:

  1. 打开“jquery.fileupload-ui.js”
  2. 搜索“prependFiles:”(减去引号)
  3. 将此行中“false”的值更改为“true”(同样,减去引号)

完成后您的代码将如下所示:

// By default, files are appended to the files container.
// Set the following option to true, to prepend files instead:
prependFiles: true,

【讨论】:

    【解决方案2】:

    你想要的选项叫:prependFiles

    默认情况下,文件会附加到文件容器中。

    将此选项设置为 true,以改为添加文件。

    类型:布尔值

    默认值:假

    (以上来自https://github.com/blueimp/jQuery-File-Upload/wiki/Options#prependfiles

    您不需要编辑任何核心文件,例如 jquery.fileupload-ui.js !!

    只需像这样初始化您的 fileUpload 组件:

    $('#fileupload').fileupload({
        prependFiles: true
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-11
      • 1970-01-01
      • 1970-01-01
      • 2017-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-28
      相关资源
      最近更新 更多