Created
February 17, 2014 06:08
-
-
Save dongyuwei/9045559 to your computer and use it in GitHub Desktop.
fix multiple select bug for mobile safari
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
(function(){ | |
//fix a special bug in mobile safari, see https://discussions.apple.com/message/23745665#23745665 | |
var multiSelect = $('select[multiple]'); | |
multiSelect.on('blur',function(){ | |
var me = $(this); | |
me.data('value',me.val()); | |
setTimeout(function(){ | |
me.val(me.data('value')); | |
},600); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment