Skip to content

Instantly share code, notes, and snippets.

@Razer6
Last active August 29, 2015 14:05
Show Gist options
  • Save Razer6/8b4e8036ae1970a8a8a6 to your computer and use it in GitHub Desktop.
Save Razer6/8b4e8036ae1970a8a8a6 to your computer and use it in GitHub Desktop.
deactivate select2 after ESC
:javascript
$('.js-select2').bind('select2-close', function() {
setTimeout(function() {
$('.select2-container-active').removeClass('select2-container-active')
$(':focus').blur()
}, 1)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment