Last active
September 15, 2016 13:00
-
-
Save jharding/9458824 to your computer and use it in GitHub Desktop.
Example for http://twitter.github.io/typeahead.js/examples/.
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
#rtl-support .tt-dropdown-menu { | |
text-align: right; | |
} |
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
<div id="rtl-support"> | |
<input class="typeahead" type="text" dir="rtl" placeholder="نعم"> | |
</div> |
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
var arabicPhrases = new Bloodhound({ | |
datumTokenizer: Bloodhound.tokenizers.whitespace, | |
queryTokenizer: Bloodhound.tokenizers.whitespace, | |
local: [ | |
"الإنجليزية", | |
"نعم", | |
"لا", | |
"مرحبا", | |
"أهلا" | |
] | |
}); | |
$('#rtl-support .typeahead').typeahead({ | |
hint: false | |
}, | |
{ | |
name: 'arabic-phrases', | |
source: arabicPhrases | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 23 is a typo?