我正在使用jQuery Tabledit,我们可以选择使用输入框和Drop-drop,但截至目前,我需要在一个下拉菜单中进行多项选择。
如果有人对此有任何解决方案,请帮助我们。帮助非常值得一提。
我不确定这是你的期望,
$(function() {
var $table = $('table');
$table
.Tabledit({
columns: {
identifier: [0, 'id'],
hideIdentifier: true,
editable: [
[1, 'App Date'],
[2, 'App Time'],
[3, 'Service Type', '{"1": "@mdo", "2": "@fat", "3": "@twitter", "4": "@university"}',]
]
}
})
.on('click', 'button:not(.tabledit-save-button)', function() {
// prevent sorting while editing
$table[0].isUpdating = $(this).closest('td').hasClass('tabledit-edit-mode');
})
.find('select[name="Service Type"]').attr('multiple', 'multiple')
.on('click', 'button.tabledit-save-button', function() {
// update tablesorter cache
$table.trigger('update');
})
});