Skip to content

Instantly share code, notes, and snippets.

@MHM5000
Forked from jharding/rtl-support.css
Last active August 29, 2015 13:57
Show Gist options
  • Save MHM5000/9924323 to your computer and use it in GitHub Desktop.
Save MHM5000/9924323 to your computer and use it in GitHub Desktop.
#rtl-support .tt-dropdown-menu {
text-align: right;
}
<div id="rtl-support">
<input class="typeahead" type="text" dir="rtl" placeholder="نعم">
</div>
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