form-select2.js 614 B

123456789101112131415161718
  1. $(function() {
  2. "use strict";
  3. $('.single-select').select2({
  4. theme: 'bootstrap4',
  5. width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
  6. placeholder: $(this).data('placeholder'),
  7. allowClear: Boolean($(this).data('allow-clear')),
  8. });
  9. $('.multiple-select').select2({
  10. theme: 'bootstrap4',
  11. width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
  12. placeholder: $(this).data('placeholder'),
  13. allowClear: Boolean($(this).data('allow-clear')),
  14. });
  15. });