Nilot Nilot - 7 months ago 21
Javascript Question

Input Field text wrap with jQuery

I am creating an input field where I want to put the instructions for my visitors on how to proceed. The instructions will auto-hide as soon as it clicked. I could do it but I am finding the long sentences are not showing properly. I tried wrap code in css but no luck.

Here are the codes:



.replybox{}
.reply-control{
border:1px solid #ccc;
background: transparent;
font-size:20px;
width:100%;
height:100px;
color:#8d8d8d;}

<input class="reply-control" name="replybox" onblur="if (this.value == &quot;&quot;) {this.value = &quot;How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help&quot;;}" onfocus="if (this.value == &quot;How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help&quot;) {this.value = &quot;&quot;;}" value="How to wrap this text? It is hiding the overflown text. I am not finding any way. Please help" type="text"/>





JSFiddle
here.

Answer
<textarea type="text" placeholder="Update details of your present skin condition (e.g. normal, dry, flaky, etc). Optionally, add details of any past skin conditions, medication or skin treatments/surgeries undergone. You may also upload images/reports, so that doctors understand your condition better." value=""></textarea>