use the placeholder attribute instead of a placeholder text
This commit is contained in:
parent
68b59b0370
commit
e2c7f543a9
2 changed files with 7 additions and 6 deletions
|
@ -58,7 +58,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
var optiontemplate = "<option name='{identifier}'>{name}</option>";
|
var optiontemplate = "<option name='{identifier}'>{name}</option>";
|
||||||
var template = "<div id='wrapper-{index}' class='wrapper'><textarea id='input-{index}' class='input' onchange='den.update(this);'>{content}</textarea>"
|
var template = "<div id='wrapper-{index}' class='wrapper'><textarea id='input-{index}' class='input' onchange='den.update(this);' placeholder='Please enter your input ...'>{content}</textarea>"
|
||||||
+ "<select id='type-{index}' class='conversion' onchange='den.convert(this);'>"
|
+ "<select id='type-{index}' class='conversion' onchange='den.convert(this);'>"
|
||||||
+ "{options}"
|
+ "{options}"
|
||||||
+ "</select></div>";
|
+ "</select></div>";
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
template = template.replace(/\{options\}/g, options);
|
template = template.replace(/\{options\}/g, options);
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var $new = $(template.replace(/\{index\}/g, "0").replace(/\{content\}/g, "Please enter your input here."));
|
var $new = $(template.replace(/\{index\}/g, "0").replace(/\{content\}/g, ""));
|
||||||
$("body").append($new);
|
$("body").append($new);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
<title>encoder-decoder</title>
|
<title>encoder-decoder</title>
|
||||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
|
||||||
<script type="text/javascript" src="dencoder.js"></script>
|
<script type="text/javascript" src="dencoder.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue