Animating characters with jQuery
How do I make an animating characters with jquery?
A jQuery plugin for creating spinners based on ASCII.. What is a animating characters with jquery? How do you make a animating characters with jquery? This script and codes were developed by 042 on 09 January 2023, Monday.
Animating characters with jQuery - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Animating characters with jQuery</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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>
<p id="spinner1"></p>
<p id="spinner2"></p>
<p id="spinner3"></p>
<p id="spinner4"></p>
<p id="spinner5"></p>
<p id="spinner6"></p>
<p id="spinner7"></p>
<p id="spinner8"></p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Animating characters with jQuery - Script Codes CSS Codes
body { font-family: "Courier New", Courier, monospace; text-align: center; font-size: 3em; color: #444; background: #fefefe;
}
p { margin: 0.7em 0;
}
#spinner7 { font-size: 16px;
}
Animating characters with jQuery - Script Codes JS Codes
(function(window, document, $, undefined){ var CharAnim = function(elem, options){ this.elem = elem; this.frames = options.frames; this.interval = options.interval; this.maxCount = this.frames.length; this.start(); } CharAnim.prototype = { count: 0, maxCount: 0, interval: 0, timer: null, start: function(){ this.loop(); }, stop: function(){ clearInterval(this.timer); }, loop: function(){ this.timer = setInterval($.proxy(function(){ this.elem.innerHTML = this.frames[this.count]; this.count = (this.count+1) >= this.maxCount ? 0 : (this.count+1); }, this), this.interval); return this.timer; } }; $.fn.charAnim = function(options){ return this.each(function(){ if (!$(this).data('charAnim')) { var charAnim = new CharAnim(this, options); $(this).data('charAnim', charAnim); } }); }; // Examples $(function(){ $('#spinner1').charAnim({ frames: '/ — \\ |'.split(' '), interval: 120 }); $('#spinner2').charAnim({ frames: '◐ ◓ ◑ ◒'.split(' '), interval: 40 }); $('#spinner3').charAnim({ frames: '▉ ▊ ▋ ▍ ▎ ▏ ▎ ▍ ▋ ▊ ▉'.split(' '), interval: 80 }); $('#spinner4').charAnim({ frames: '┤ ┘ ┴ └ ├ ┌ ┬ ┐'.split(' '), interval: 100 }); $('#spinner5').charAnim({ frames: '◢ ◣ ◤ ◥'.split(' '), interval: 100 }); $('#spinner6').charAnim({ frames: '◡◡ ⊙⊙ ◠◠'.split(' '), interval: 40 }); $('#spinner7').charAnim({ frames: '(-*--------) (--*-------) (-----*----) (-------*--) (---------*)'.split(' '), interval: 220 }); });
}(window, document, jQuery));
Developer | 042 |
Username | 042 |
Uploaded | January 09, 2023 |
Rating | 3 |
Size | 2,776 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 |
Custom HTML Nested List Counters | 2,534 Kb |
JCycle2 with HammerJS | 15,418 Kb |
Custom Kakao Share Button | 2,000 Kb |
Scrolling through cards with stepper | 4,994 Kb |
Fastest website generator, ever. | 55,238 Kb |
Vertical Sprite with Greensock TweenMax | 1,889 Kb |
JF_01 | 3,007 Kb |
The Singapore Flag using Pure CSS | 2,807 Kb |
Colored Numbers for Ordered List | 2,352 Kb |
Fixed responsive layout | 2,485 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 |
Box-sizing | Elad2412 | 1,572 Kb |
Fading Navigation Bar | J-w-v | 2,805 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Sticky notes with CSS3 | HaiNguyen007 | 2,146 Kb |
Simple Responsive Text | Fbrz | 2,282 Kb |
Nice responsive team page | Infomiho | 3,139 Kb |
RWD Conversion Practice | Jxqr97 | 2,743 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Multiple jCarousel | Pafnuty | 2,461 Kb |
Ball Physics | Getsetbro | 3,149 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!