Topic: multiselect close

Gerard Fossoul pro asked 3 years ago

How can I make the multiselect execute a function when losing focus or exiting?

I have this function:

$('#selectEmp').on('change',function(e) { ....

but it works for me by pressing an option, I want it to work when I lose the focus or exit.

I have tried 'close', 'lostfocus', 'blur' and there is no way

Tomek Makowski staff answered 3 years ago


Try out this solution

Here i added blur event on because original input element is replace with it


Gerard Fossoul pro answered 3 years ago

and i want know the people select a diferent option..... because i open the select and don0t select anything, when i go out, the function is run.... I want that don't run if i don't select any option...

Tomek Makowski staff commented 3 years ago

check it now

Now you have list of active options

Gerard Fossoul pro answered 3 years ago

other question, i have more than one multiselect, how i know the actual select? or

Gerard Fossoul pro answered 3 years ago

perfect is asolution!

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: pc
  • Browser: chrome
  • OS: windows10
  • Provided sample code: No
  • Provided link: No