7722f53f10
・ファイル名、クラス名の変更 ・タクソノミーの有効化で、カテゴリー、タグ、カスタム分類のメタキーを分割 ・表示用クラスの追加 ・readmeの追加等
22 lines
762 B
JavaScript
22 lines
762 B
JavaScript
jQuery(function ($) {
|
|
|
|
let cat_ul_count = $('.post-order-list').length; //カテゴリ総数
|
|
for (let i = 0; i < cat_ul_count; i++) {
|
|
let my_list = $('.post-order-list:eq(' + i + ')');
|
|
my_list.sortable(
|
|
{
|
|
update: function () {
|
|
let list_count = $('.product-list', my_list).length;
|
|
for (let j = 0; j < list_count; j++) {
|
|
let list_order = j + 1;
|
|
$('.list_order:eq(' + j + ')', my_list).val(list_order);
|
|
$('.list_order:eq(' + j + ')', my_list).siblings('.sort-num-label').text(list_order);
|
|
}
|
|
}
|
|
}
|
|
);
|
|
my_list.disableSelection();
|
|
}
|
|
|
|
|
|
}); |