0

I have a select field with multi select option in which I need to trigger an ajax call after the select box closes(after selecting multiple options) at select box. Any help to implement this functionality. $('#selectBoxId').on 'change', -> $.ajax url: '/filter' dataType: 'script'

I have code like this. This triggers ajax call on each select option. I don't use any plugin for multi select

Aarthi
  • 1,451
  • 15
  • 39

1 Answers1

0

You can accomplish this by firing on .blur() rather than .change(), if you're using a native <select multiple="multiple"> without plugin.

.change() event fires each time the value is changed. .blur() event fires only when the select element loses focus. But this event may not bubble down depending on whether you're using a third-party plugin or not.

Patrick Moore
  • 13,251
  • 5
  • 38
  • 63