-1

I found on my bank site that while I am entering information into a input field the initial placeholder changes size to smaller and is pushed to the upper left side of the input field. I find it very helpful for users to see what questions they are asked while typing it into the field instead of placeholder disappearing altogether. Any ideas on how to best implement it?

max
  • 1
  • 1
  • See [this](https://jsfiddle.net/273ntk5s/2/). Possible duplicate of [this](http://stackoverflow.com/questions/35942247/how-to-move-placeholder-to-top-on-focus-and-while-typing) – philantrovert Dec 26 '16 at 06:51

2 Answers2

0

You are looking for something like this https://tympanus.net/codrops/2015/01/08/inspiration-text-input-effects/

it is a new trend for text input styling

0

Use the onchange JavaScript event:

The HTML Form:

<form id="myForm>
<input type="text" onchange="changeForm(this)" id="text">
</form>

The JavaScript function:

function changeForm(elm) {
elm[0].setAttribute("style", "height: 50px");
}
Zer0
  • 1,580
  • 10
  • 28