Do you know how to perform the following functionality in Bootstrap or jQuery/JavaScript?
- Default input state with placeholder text (i.e. "Email" placeholder)
- Click that input
- Start typing your email address
- The "Email" placeholder disappears
- An "Email" label appears and moves up above the typed email address and inside of the input
You can view a demo of this on Shopify:
- Go to https://simpletheme.myshopify.com/collections/all/products/contrast-jacket?variant=335385313
- Add to Cart
- View Cart
- Check Out
- Enter an email address in the "Email" input
Here's a starting point on Plunker:
https://plnkr.co/edit/bd9yGmgKfK53Tpn8rCSp?p=preview
<!DOCTYPE html>
<html>
<head>
<style>
label {
display: none;
}
</style>
</head>
<body>
<label>Email</label>
<br />
<input placeholder="Email" />
</body>
</html>
Any advice on how to replicate this functionality is greatly appreciated.