javascript - Highlight event on Select2 v4 -
as "select2-highlight" event has been removed, try replicate using code:
$('body').on({ mouseenter: function () { var highlighted_item = $(this).text(); // code }, mouseleave: function () { // code } }, '.select2-results__option.select2-results__option--highlighted');
my issue in callback don't seem find way know select2 control and/or input triggering event. selector '.select2-results__option.select2-results__option--highlighted'being inside out of scope element (added @ end of body select2), no "$.parents()" can work.
how done? can it?
Comments
Post a Comment