use the placeholder attribute instead of a placeholder text

This commit is contained in:
Manuel Friedli 2015-03-26 17:26:17 +01:00
parent 68b59b0370
commit e2c7f543a9
2 changed files with 7 additions and 6 deletions

View file

@ -58,7 +58,7 @@
];
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);'>"
+ "{options}"
+ "</select></div>";
@ -72,7 +72,7 @@
template = template.replace(/\{options\}/g, options);
$(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);
});

View file

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<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="dencoder.js"></script>