Created
October 1, 2013 08:56
-
-
Save olimortimer/6775681 to your computer and use it in GitHub Desktop.
JS: Select2 FastClick Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#select2').select2({ | |
data: data, | |
// Add our 'needsclick' to each item, so FastClick doesn't get applied | |
formatResult: function(result, container, query, escapeMarkup) { | |
container.addClass('needsclick'); | |
return result.text; | |
} | |
}); |
Thank you sir just spent an hour wondering why the plugin did not work on ipad!
Hello, is there any update that works with select2 4.0.0?
Thanks!
Yes, I'm also looking for a fix that works with 4.0.0.
I need a select2 4.0 fix too ^^
any idea ?
Hey , i juste find a fix for Fast click and select2 (4.0) 😄 Juste replace your fastClik file with this 😄
https://raw.githubusercontent.com/ftlabs/fastclick/569732a7aa5861d428731b8db022b2d55abe1a5a/lib/fastclick.js
It works for me
@jarodxxx Works! thanks!
If you are looking for a solution for the combination between Select2 4.0.1 and FastClick 1.0.6 (both latest by the time I am writing this), see my fix here: select2/select2#3222 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested and works perfect. Thanks mate.