Button shaking
How do I make an button shaking?
What is a button shaking? How do you make a button shaking? This script and codes were developed by Susanne Karin Lundblad on 13 September 2022, Tuesday.
Button shaking - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Button shaking </title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrap"><button class="btn"> <span class="default btn-caption">Click</span><span class="error btn-caption">Error</span>
</button></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Button shaking - Script Codes CSS Codes
*,
*:before,
*:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
html, body { margin: 0; padding: 0; background-color: #ecf0f1;
}
.wrap { margin: 20% auto; width: 400px; text-align: center;
}
.btn { border: 0px; border-radius: 4px; color: white; font-family: "Helvetica Neue",sans-serif; font-weight: 200; font-size: 20px; padding: 5px 15px; background-color: #2980b9; transition: all 0.2s linear; outline: none; letter-spacing: 1px;
}
button:hover { background-color: #3498db; cursor: pointer;
}
.default { display: block;
}
.error { display: none;
}
@-webkit-keyframes shaker { 0% { -webkit-transform: translate(2px, 0); } 50% { -webkit-transform: translate(-2px, 0); } 100% { -webkit-transform: translate(2px, 0); }
}
.shake { -webkit-animation-name: shaker; -webkit-animation-duration: 0.1s; -webkit-transform-origin:50% 50%; -webkit-animation-timing-function: linear; background-color: #c0392b;
}
.shake:hover { background-color: #e74c3c;
}
.shake .default { display: none;
}
.shake .error { display: block;
}
Button shaking - Script Codes JS Codes
$(".btn").on("click", function() { $(this).addClass("shake"); var delay = setTimeout(function(){ $(".shake").removeClass("shake"); }, 3000)
});

Developer | Susanne Karin Lundblad |
Username | SusanneLundblad |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,227 Kb |
Views | 48,552 |
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 |
Css man | 3,712 Kb |
Floating element with shadow | 1,783 Kb |
CSS-masking gallery | 2,567 Kb |
Blend mode of text | 2,269 Kb |
Getting username from email adress | 3,443 Kb |
Fullscreen portfolio startpage | 3,041 Kb |
Wake animation | 4,322 Kb |
Susie | 2,797 Kb |
Flying pinata | 3,560 Kb |
Cat button | 2,478 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 |
JS Countdown Timer | Ayoungh | 2,435 Kb |
A Pen by Jonas Bjork | Jonasbjork | 3,115 Kb |
Canvas Fireworks | Jackrugile | 6,200 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 Kb |
Scroll effect with text with help from Skrollr | Luxonglassing | 2,935 Kb |
Board Site | IndianaLuft | 10,542 Kb |
Buttons with style | Chbymnky | 2,082 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Print element on a page | Mrs_snow | 2,081 Kb |
Welcome | Nakome | 6,076 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!