Button shaking

2,227 Kb

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 Previews

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">
<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>

Button shaking - Script Codes CSS Codes

*: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)
Button shaking - Script Codes
Button shaking - Script Codes
Home Page Home
Developer Susanne Karin Lundblad
Username SusanneLundblad
Uploaded September 13, 2022
Rating 3
Size 2,227 Kb
Views 48,552
Do you need developer help for Button shaking?

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!

Susanne Karin Lundblad (SusanneLundblad) Script Codes
Create amazing video scripts with AI!

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!