//= require select2 jQuery(function($) { // Make select beautiful $('select.select2').select2({ allowClear: true }); function format_taxons(taxon) { new_taxon = taxon.text.replace('->', '') return new_taxon; } $("#product_taxon_ids").on({ change: function(e){ $('.select2-search-choice .with-tip').powerTip({ smartPlacement: true, fadeInTime: 50, fadeOutTime: 50 }) } }) })