Last active
February 1, 2016 11:28
-
-
Save sotoz/88a8f02174d4ebc1ec57 to your computer and use it in GitHub Desktop.
inputToUppercase
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 inputUppercase(input) | |
{ | |
input.bind('keyup', function (e) { | |
qq = input.val().toUpperCase(); | |
//fix greek accented characters | |
data = qq.replace(/[ΈΆΌΎΊΉ]/g, function (m) { | |
return { | |
'Έ': 'Ε', | |
'Ά': 'Α', | |
'Ό': 'Ο', | |
'Ί': 'Ι', | |
'Ύ': 'Υ', | |
'Ή': 'Η' | |
}[m]; | |
}); | |
input.val(data); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment