LondonGuy LondonGuy - 1 year ago 176
jQuery Question

How do I auto-hide placeholder text upon focus using css or jquery?

This is done automatically for every browser except Chrome.

I'm guessing I have to specifically target Chrome.

Any solutions?

If not with CSS then jQuery?

Answer Source


<input type="text" placeholder="enter your text" onfocus="this.placeholder = ''" onblur="this.placeholder = 'enter your text'" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download