wenzhixin / multiple-select

A jQuery plugin to select multiple elements with checkboxes :)
http://multiple-select.wenzhixin.net.cn
MIT License
1.91k stars 651 forks source link

option multipleWidth with more flexibility #576

Open ltdeta opened 3 years ago

ltdeta commented 3 years ago

Please do not set the multipleWidth option statically to px

this.$drop.find('.multiple').css('width', "".concat(this.options.multipleWidth, "px"));

It would be better to pass the unit with in the option

this.$drop.find('.multiple').css('width', this.options.multipleWidth);

example1: $.multipleSelect( { multiple: true, multipleWidth: '230px' } ); grafik

example2: $.multipleSelect( { multiple: true, multipleWidth: '100%' } ); grafik