Reorder HTML table rows using drag-and-drop

后端 未结 7 505
無奈伤痛
無奈伤痛 2021-01-29 23:00

I have a jQuery function to move table rows up and down. I do not know how to save the data, nor get the position of each row. I am using PHP to show the table rows.

How

7条回答
  •  一整个雨季
    2021-01-29 23:51

    thanks to Jim Petkus that did gave me a wonderful answer . but i was trying to solve my own script not to changing it to another plugin . My main focus was not using an independent plugin and do what i wanted just by using the jquery core !

    and guess what i did find the problem .

    var title = $("em").attr("title");
    $("div").text(title);
    

    this is what i add to my script and the blew codes to my html part :

     $weight
    

    and found each row $weight value

    thanks again to Jim Petkus

提交回复
热议问题