JQuery fallback for placeholder
How do I make an jquery fallback for placeholder?
What is a jquery fallback for placeholder? How do you make a jquery fallback for placeholder? This script and codes were developed by Asakasinsky on 27 December 2022, Tuesday.
JQuery fallback for placeholder - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>jQuery fallback for placeholder</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="text" placeholder="Enter =>"> <script src="js/index.js"></script>
</body>
</html>
JQuery fallback for placeholder - Script Codes CSS Codes
body { margin: 5% auto; background: #fff; }
input { font-size: 44px; padding: 20px; font-family: courier; font-weight: bold; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; border: 4px solid rgba(0,0,0,.15); display: block; margin: 50px auto; width: 80%; background: rgba(255,255,255,0.9); overflow: hidden; text-overflow: ellipsis;
}
input:focus { outline: 0; border: 4px solid rgba(0,0,0,.3); -webkit-box-shadow: 0 0 10px rgba(0,0,0,.3);
}
JQuery fallback for placeholder - Script Codes JS Codes
$(document).ready(function() { if ( !("placeholder" in document.createElement("input")) ) { $("input[placeholder], textarea[placeholder]").each(function() { var val = $(this).attr("placeholder"); if ( this.value == "" ) { this.value = val; } $(this).focus(function() { if ( this.value == val ) { this.value = ""; } }).blur(function() { if ( $.trim(this.value) == "" ) { this.value = val; } }) }); // Clear default placeholder values on form submit $('form').submit(function() { $(this).find("input[placeholder], textarea[placeholder]").each(function() { if ( this.value == $(this).attr("placeholder") ) { this.value = ""; } }); }); }
});
Developer | Asakasinsky |
Username | asakasinsky |
Uploaded | December 27, 2022 |
Rating | 3 |
Size | 2,044 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 |
Modernizr.custom.js | 5,583 Kb |
Generative Boids | 3,700 Kb |
Seamless scroll animation | 2,083 Kb |
Mega Menu by Joni | 3,171 Kb |
Flipclock | 4,813 Kb |
Icon Fonts - emocons.js jQuery plugin | 3,214 Kb |
Tear-able Cloth | 3,768 Kb |
Seconds counter | 4,153 Kb |
Icon Fonts - SocialCount meets Style | 3,709 Kb |
Bokeh Modal | 4,445 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 |
Brent Burns Tribute Page | Nevada48 | 2,569 Kb |
AOR site logo | Thatbram | 2,527 Kb |
Cartoon Bomb | Tcmulder | 4,929 Kb |
Pictos font library from CodePen | Jstam | 3,790 Kb |
Google Fonts Sass Mixin | HugoGiraudel | 4,237 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
CMP5-Opdracht15 | SannevanGastel | 2,733 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
Impress JS Algorhytmic Generator | Jeffscottward | 7,906 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!