Subscribe Button
How do I make an subscribe button?
Prototype / not fully functional. What is a subscribe button? How do you make a subscribe button? This script and codes were developed by Todd Moy on 14 October 2022, Friday.
Subscribe Button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Subscribe Button</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="subscribe-button"> <label for="e1"><span>Subscribe by Email</span></label> <div class="fields"> <input id="e1" class="email-input" type="email" placeholder="[email protected]" /> <input class="email-submit" type="submit" value="Subscribe" /> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Subscribe Button - Script Codes CSS Codes
* { box-sizing: border-box;
}
html, body { height: 100%; font-family: futura, helvetica, sans-serif;
}
body { display: flex; justify-content: space-around; align-items: center; flex-direction: column; background-color: pink;
}
.subscribe-button { background-color: black; border: solid black 2px; display: flex; flex-direction: column; width: 200px; height: 70px; overflow: hidden; transition: all 0.2s ease-out;
}
.subscribe-button label { display: flex; justify-content: center; align-items: center; background-color: black; color: white; cursor: pointer; position: relative; min-height: 100%; text-align: center; transition: all 0.2s ease-out;
}
.subscribe-button label:hover { background-color: white; color: black;
}
.subscribe-button .fields { background-color: blue; display: flex; flex-direction: row; min-height: 100%;
}
.subscribe-button .email-input { border: 0; font-size: 1em; flex-grow: 1; min-height: 100%; padding-left: 20px;
}
.subscribe-button .email-submit { background-color: black; color: white; border: 0; font-size: 1em; min-height: 100%; padding: 0 20px; cursor: pointer; border-left: solid black 2px;
}
.subscribe-button .email-submit:hover { background-color: white; color: black;
}
.subscribe-button:hover { background-color: black; color: white; cursor: pointer;
}
.subscribe-button--active { width: 400px;
}
.subscribe-button--active .fields,
.subscribe-button--active label { transform: translateY(-66px);
}
Subscribe Button - Script Codes JS Codes
$(document).ready(function(){ $("label").on('click', function(){ $(this).parent(".subscribe-button").addClass("subscribe-button--active"); }); $(".email-input").on('blur', function(){ $(this).parents(".subscribe-button").removeClass("subscribe-button--active"); })
});
Developer | Todd Moy |
Username | toddmoy |
Uploaded | October 14, 2022 |
Rating | 3 |
Size | 2,906 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Chrome Store Copy | 3,593 Kb |
Hidden Menu Test | 3,582 Kb |
Modal Interaction Test | 3,142 Kb |
Logo Animation | 2,580 Kb |
A Pen by Todd Moy | 2,144 Kb |
Menu Test | 4,460 Kb |
Experiment | 3,868 Kb |
Flexbox test | 2,152 Kb |
Experiment | 2,849 Kb |
Header Test | 7,978 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by MurabitoB | MurabitoB | 4,421 Kb |
Marching Squares Visualized | Sakri | 7,074 Kb |
Login with flip 3d animation | Mariusbalaj | 3,014 Kb |
Guage | Roygwells | 5,653 Kb |
Wave Lines | Mikehobizal | 4,023 Kb |
Svg animation draw | SzymonDziewonski | 5,545 Kb |
A vuejs widget | Chrgl86 | 2,869 Kb |
CSS Google Now | Jackmoran | 3,196 Kb |
Touch Carousel - last, no gaps. | Berkin | 4,332 Kb |
Ocean | Gordonnl | 2,817 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!