assets/css/chosen.css
assets/js/chosen.jquery.min.js
$('.chosen-select').chosen();
.tag-input-style
class to select
element
for an alternative multiple chosen style:
//an example of a chosen inside a modal $('#modal-form').on('shown.bs.modal', function () { $('.chosen-select').chosen(); }) //or $('#modal-form').on('shown.bs.modal', function () { $(this).find('.chosen-container').each(function(){ $(this).find('a:first-child').css('width' , '210px'); $(this).find('.chosen-drop').css('width' , '210px'); $(this).find('.chosen-search input').css('width' , '200px'); }); })
$(window).on('resize.chosen', function() { //get its parent width var w = $('.chosen-select').parent().width(); $('.chosen-select').siblings('.chosen-container').css({'width':w}); }).triggerHandler('resize.chosen');
assets/css/select2.css
assets/js/select2.min.js
assets/js/bootstrap-tag.min.js
var tag_input = $('#form-field-tags'); try{ tag_input.tag({ placeholder: tag_input.attr('placeholder'), //source: ['tag 1', 'tag 2'],//static autocomplet array //or fetch data from database, fetch those that match "query" source: function(query, process) { $.ajax({url: 'remote_source.php?q='+encodeURIComponent(query)}) .done(function(result_items){ process(result_items); }); } }); } catch(e) { //display a textarea for old IE, because it doesn't support this plugin or another one I tried! tag_input.after('<textarea id="'+tag_input.attr('id')+'" name="'+tag_input.attr('name')+'" rows="3">'+tag_input.val()+'</textarea>').remove(); }
//programmatically add a new tag var $tag_obj = $('#form-field-tags').data('tag'); $tag_obj.add('new tag');
assets/js/jquery.maskedinput.min.js
assets/js/jquery.inputlimiter.1.3.1.min.js
$('textarea.limited').inputlimiter({ remText: '%n character%s remaining...', limitText: 'max allowed : %n.' });
assets/js/jquery.autosize.min.js
$('textarea.autosize').autosize({append: "\n"});