Drag and sort pictures, how to save the sorted order?

WBOY
Release: 2016-08-23 09:17:46
Original
1910 people have browsed it

Now I want to save the current order of the pictures after dragging and sorting them. The problem is that when I drag the pictures now, when I click save, it is still in the previous order.
Drag and sort pictures, how to save the sorted order?

Drag and sort pictures, how to save the sorted order?

<code>   //获取图片数组
    var goods_img = new  Array;
    $("._img").each(function(i){
        goods_img[i] = $(this).attr('src');
    });</code>
Copy after login
Copy after login

I change the position of the pictures, but the order of the pictures obtained does not change. Is there any way to drag the pictures so that the order of the pictures obtained also changes?

Reply content:

Now I want to save the current order of the pictures after dragging and sorting them. The problem is that when I drag the pictures now, when I click save, it is still in the previous order.
Drag and sort pictures, how to save the sorted order?

Drag and sort pictures, how to save the sorted order?

<code>   //获取图片数组
    var goods_img = new  Array;
    $("._img").each(function(i){
        goods_img[i] = $(this).attr('src');
    });</code>
Copy after login
Copy after login

I change the position of the pictures, but the order of the pictures obtained does not change. Is there any way to drag the pictures so that the order of the pictures obtained also changes?

After dragging into the database, update the database and refresh the page

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template