You cannot externally use the second function in hover()
. However, since hover()
is just a shortcut to mouseenter()
and mouseleave()
, you can assign them separately so you can run them as needed. Try the following:
$('#adm1n-toolbar') .mouseenter(function() { // ... }) .mouseleave(function() { // ... }); $('#adm1n-toolbar-content select').change(function(e) { $('#adm1n-toolbar').trigger('mouseleave'); });
source share