johnny / johnny/jquery-sortable

Get new order of sorted rows in a table

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

You have good examples of sorted lists, but when it comes to the sorted table there are a few things I cannot understand.

// Sortable rows
$('.sorted_table').sortable({
containerSelector: 'table',
itemPath: '> tbody',
itemSelector: 'tr',
placeholder: '<tr class="placeholder"/>'
})

I have a table with tr id=1, id=2, id=3 and so on ..

How do I use the onDrop to get the new order, for instance: 2, 1, 3? I need it in an array in order to send it to mysql.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.