Blame view
assets/js/pages/form-select2.js
698 Bytes
cf76164e6 20190709 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
$(document).ready(function() { $('select').select2(); $('#multiple').select2({ placeholder: 'Select Multiple States' }); $(".js-example-basic-multiple-limit").select2({ maximumSelectionLength: 2, placeholder: 'Limited Selection' }); $(".js-example-tokenizer").select2({ tags: true, tokenSeparators: [',', ' '], placeholder: 'With Tokenization' }); var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }]; $(".js-example-data-array").select2({ data: data }); }); |