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

Popular posts from this blog

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -