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
});