0
こんにちは私はドロップダウンリストのselect2プラグインを使用しています。オープンイベントでは幅を別の値に設定しようとしていますが、成功しません。より便利な方法でこれを達成する方法はありますか?動的に幅を変更するSelect2
$('#select').select2({
width: o.width,
data: objs // some data
});
$('$select').on('select2:open', function (e) {
$(this).select2({width: 400}); // this does not work...
// select2 is opened, handle event
});