This plugin adds kana (hiragana and katakana) functionality to an <input> tag.
To initialize the plugin use:
<input type="text">
<script>
$(function() {
$("input").kana({mode: "hiragana"});
});
</script>
Available modes are: "hiragana", "katakana" and "romaji". The "romaji" doesn't really change anything but makes it possible to reset the element.
The default mode is "hiragana".
It's possible to re-initialize an element. The following code
$("input").kana({mode: "hiragana"})
$("input").kana({mode: "romaji"})
will result in a normal input tag.
The plugin is used in my dictionary application. Please go there to try it out.
The source code is released under the MIT license. Please use it as you like.
Please send bug reports and suggestions to andreas@argeli.us.