Styling individual select2 tags
问题 I'm trying to style individual select2 tags using Bootstrap's button styles ( .btn-primary and .btn-danger ) based on if the user created a tag (applying the red .btn-danger style) or if the user selected a existing tag (applying the blue .btn-primary style. I've tried to apply the style during the select event (select2:select) event: $("#ticker_select").on('select2:select', function(e) { // If the e.params.data.id equals e.params.data.txt, // then it is a user-created tag! if (e.params.data