Newton Balls Loading Animation

Size
2,426 Kb
Views
8,096

How do I make an newton balls loading animation?

Newton Balls animation using jquery, jquery easing plugin and some css animations. A change of pace from the daisy wheel loading animation.. What is a newton balls loading animation? How do you make a newton balls loading animation? This script and codes were developed by Retrofuturistic on 19 January 2023, Thursday.

Newton Balls Loading Animation Previews

Newton Balls Loading Animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Newton Balls Loading Animation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container">
<div class="circle left"></div>
<div class="circle center"></div>
<div class="circle right"></div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Newton Balls Loading Animation - Script Codes CSS Codes

.container { position:relative; margin:100px; width: 100px; height:17px; -webkit-animation: spinning 8s infinite; -moz-animation: spinning 5s infinite; animation: spinning 5s infinite;
}
.circle { position:absolute; display:inline-block; background-color:#000000; width:16px; height:16px; border-radius:16px;
}
.circle.right { left:calc(50% + 8px); /*background-color:red;*/
}
.circle.left { left:0px; /*background-color:green;*/
}
.circle.center { left: calc(50% - 8px); /*background-color:blue;*/
}
@-webkit-keyframes spinning { 0% { -webkit-transform:rotate(0deg); } 25% { -webkit-transform:rotate(180deg); } 35% { -webkit-transform:rotate(180deg); } 60%{ -webkit-transform:rotate(-180deg); } 70%{ -webkit-transform:rotate(-180deg); } 100% { -webkit-transform:rotate(0deg); }
}
@-moz-keyframes spinning { 0% { -moz-transform:rotate(0deg); } 25% { -moz-transform:rotate(180deg); } 35% { -moz-transform:rotate(180deg); } 60%{ -moz-transform:rotate(-180deg); } 70%{ -moz-transform:rotate(-180deg); } 100% { -moz-transform:rotate(0deg); }
}
@keyframes spinning { 0% { transform:rotate(0deg); } 25% { transform:rotate(180deg); } 35% { transform:rotate(180deg); } 60%{ transform:rotate(-180deg); } 70%{ transform:rotate(-180deg); } 100% { transform:rotate(0deg); }
}

Newton Balls Loading Animation - Script Codes JS Codes

$(document).ready(function () { startLeftForwardBump();
});
function startLeftForwardBump() { var duration = 1000; var leftCircle = $('.circle.left'); var leftBumpPos = ($('.container').width()*0.5) - 24; leftCircle.animate({ left: leftBumpPos+'px', width:'16px', height:'16px', borderRadius:'16px' },{ duration:duration, queue:false, easing:'easeInExpo', complete:leftForwardBumpDone });
}
function leftForwardBumpDone() {	var duration = 1000;	var rightCircle = $('.circle.right');	var rightBumpPos = $('.container').width() - (rightCircle.width() *0.5);	rightCircle.animate({	left: rightBumpPos+'px', width:'10px', height:'10px', borderRadius:'10px'	},{	duration:duration,	queue:false, easing:'easeOutBack',	complete:rightForwardBumpDone	});
}
function rightForwardBumpDone() { var duration = 1000; var rightCircle = $('.circle.right'); var rightBumpPos = ($('.container').width()*0.5) + 8; rightCircle.animate({ left: rightBumpPos+'px', width:'16px', height:'16px', borderRadius:'16px' },{ duration:duration, queue:false, easing:'easeInExpo', complete:rightBackBumpDone });
}
function rightBackBumpDone() { var duration = 1000; var leftCircle = $('.circle.left'); leftCircle.animate({ left: '0px', width:'10px', height:'10px' },{ duration:duration, queue:false, easing:'easeOutBack', complete:startLeftForwardBump });
}
Newton Balls Loading Animation - Script Codes
Newton Balls Loading Animation - Script Codes
Home Page Home
Developer Retrofuturistic
Username retrofuturistic
Uploaded January 19, 2023
Rating 3
Size 2,426 Kb
Views 8,096
Do you need developer help for Newton Balls Loading Animation?

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!

Retrofuturistic (retrofuturistic) Script Codes
Create amazing blog posts 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!