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

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

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -