-
-
Save MHM5000/9924323 to your computer and use it in GitHub Desktop.
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.obj.whitespace('word'), | |
queryTokenizer: Bloodhound.tokenizers.whitespace, | |
local: [ | |
{ word: "الإنجليزية" }, | |
{ word: "نعم" }, | |
{ word: "لا" }, | |
{ word: "مرحبا" }, | |
{ word: "کریم" }, | |
{ word: "رحیم" }, | |
{ word: "رحمن" }, | |
{ word: "عامل" }, | |
{ word: "حمید" }, | |
{ word: "محمد" }, | |
{ word: "سعید" }, | |
{ word: "خالق" }, | |
{ word: "ضیغ" }, | |
{ word: "صیدلیه" }, | |
{ word: "ثم" }, | |
{ word: "قیام" }, | |
{ word: "فیلم" }, | |
{ word: "غیر" }, | |
{ word: "هیاهو" }, | |
{ word: "دست" }, | |
{ word: "أهلا" } | |
] | |
}); | |
arabicPhrases.initialize(); | |
$('#rtl-support .typeahead').typeahead({ | |
hint: false | |
}, | |
{ | |
name: 'arabic-phrases', | |
displayKey: 'word', | |
source: arabicPhrases.ttAdapter() | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment