Morse Code Input For Text Field - jQuery morseCodeInput.js
| File Size: | 5.49 KB |
|---|---|
| Views Total: | 411 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
morseCodeInput.js is a funny jQuery plugin which allows the users to type text information in an input field using Morse Code.
How to use it:
1. Include the jQuery library, morse-code-input.css and morse-code-input.js on the html page.
<link rel="stylesheet" href="morse-code-input.css"> <script src="jquery.min.js"></script> <script src="jquery.morseCodeInput.js"></script>
2. Call the function on the target input field and done.
$("input").morseCodeInput();
3. Default plugin configuration options.
$("input").morseCodeInput({
dot_duration: 100,
input_started: false,
input_value: '',
text_value: '',
short_gap_timer: null,
active_element: null,
down_date: null,
up_date: null,
down_timer: null,
});
4. You are also allowed to override the default Morse code letters and numerals.
$("input").morseCodeInput({
_code: {".-": "A","-...": "B","-.-.": "C","-..": "D",".": "E","..-.": "F","--.": "G","....": "H","..": "I",".---": "J","-.-": "K",".-..": "L","--": "M","-.": "N","---": "O",".--.": "P","--.-": "Q",".-.": "R","...": "S","-": "T","..-": "U","...-": "V",".--": "W","-..-": "X","-.--": "Y","--..": "Z","-----": "0",".----": "1","..---": "2","...--": "3","....-": "4",".....": "5","-....": "6","--...": "7","---..": "8", "----.": "9", ".-.-.-": ".", "--..--": ",", "..--..": "?", ".----.": "'", "-..-.": "/", "-.--.": "(", "-.--.-": ")", ".-...": "&", "---...": ":", "-.-.-.": ";", "-...-": "=", ".-.-.": "+", "-....-": "-", "..--.-": "-", ".-..-.": "\"", "...-..-": "$", "-.-.--": "!", ".--.-.": "@"},
});
This awesome jQuery plugin is developed by Shmakov. For more Advanced Usages, please check the demo page or visit the official website.





