Added simple Read and Print Text function
This commit is contained in:
parent
61c56cc177
commit
a4ae189442
4 changed files with 25 additions and 4 deletions
19
index.html
19
index.html
|
@ -2,6 +2,7 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Morse Converter</title>
|
<title>Morse Converter</title>
|
||||||
<link rel="stylesheet" type="text/css" href="res/css/main.css" />
|
<link rel="stylesheet" type="text/css" href="res/css/main.css" />
|
||||||
|
<script src="./res/js/jquery-2.1.3.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<span class="actionbar">Morse Converter</span>
|
<span class="actionbar">Morse Converter</span>
|
||||||
|
@ -14,16 +15,26 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<textarea class="input">Enter your text.</textarea>
|
<textarea class="input" id="textarea">Enter your text.</textarea>
|
||||||
<div class="carddivider"></div>
|
<div class="carddivider"></div>
|
||||||
<div class="cardbuttons">
|
<div class="cardbuttons">
|
||||||
<span class="cardbutton">ENCODE</span>
|
<span class="cardbutton" onclick="getText()">ENCODE</span>
|
||||||
<span class="cardbutton">DECODE</span>
|
<span class="cardbutton">DECODE</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card ">
|
<div class="card" id="outputcard">
|
||||||
<div class="cardtext">Please enter at least one character</div>
|
<div class="cardtext">
|
||||||
|
<span id="output"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
<script>
|
||||||
|
function getText(){
|
||||||
|
var input = $('#textarea').val()
|
||||||
|
console.log(input)
|
||||||
|
$('#output').text(input)
|
||||||
|
$('#outputcard').fadeIn(300)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -95,4 +95,7 @@ body {
|
||||||
.cardbutton:hover {
|
.cardbutton:hover {
|
||||||
background: #e0e0e0; }
|
background: #e0e0e0; }
|
||||||
|
|
||||||
|
#outputcard {
|
||||||
|
display: none; }
|
||||||
|
|
||||||
/*# sourceMappingURL=main.css.map */
|
/*# sourceMappingURL=main.css.map */
|
||||||
|
|
|
@ -110,3 +110,6 @@ body
|
||||||
|
|
||||||
.cardbutton:hover
|
.cardbutton:hover
|
||||||
background: $hovered-element-color
|
background: $hovered-element-color
|
||||||
|
|
||||||
|
#outputcard
|
||||||
|
display: none
|
||||||
|
|
4
res/js/jquery-2.1.3.min.js
vendored
Normal file
4
res/js/jquery-2.1.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in a new issue