Morse Code Input jQuery - Download Morse Code Input For Text Field - jQuery morseCodeInput.js

Download Morse Code Input For Text Field – jQuery morseCodeInput.js

Posted on

This time I will share jQuery Plugin and tutorial about Morse Code Input For Text Field – jQuery morseCodeInput.js, hope it will help you in programming stack.

Morse Code Input jQuery - Download Morse Code Input For Text Field - jQuery morseCodeInput.js

File Size: 5.49 KB
Views Total: 341
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.

1 <link rel="stylesheet" href="morse-code-input.css">
2 <script src="jquery.min.js"></script>
3 <script src="jquery.morseCodeInput.js"></script>

2. Call the function on the target input field and done.

1 $("input").morseCodeInput();

3. Default plugin configuration options.

01 $("input").morseCodeInput({
02   dot_duration: 100,
03   input_started: false,
04   input_value: '',
05   text_value: '',
06   short_gap_timer: null,
07   active_element: null,
08   down_<a href="https://www.jqueryscript.net/time-clock/">date</a>: null,
09   up_date: null,
10   down_timer: null,
11 });

4. You are also allowed to override the default Morse code letters and numerals.

1 $("input").morseCodeInput({
2   _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", ".-.-.-": ".", "--..--": ",", "..--..": "?", ".----.": "'", "-..-.": "/", "-.--.": "(", "-.--.-": ")", ".-...": "&", "---...": ":", "-.-.-.": ";", "-...-": "=", ".-.-.": "+", "-....-": "-", "..--.-": "-", ".-..-.": """

source : jqueryscript.net