Circle Progression Plugin
How do I make an circle progression plugin?
Circles that fill to a desired percentage.. What is a circle progression plugin? How do you make a circle progression plugin? This script and codes were developed by Adam Grayson on 10 November 2022, Thursday.
Circle Progression Plugin - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Circle Progression Plugin</title> <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> <div class="google chart"> <div class="tag">google</div>
</div>
<div class="moz chart"> <div class="tag">mozilla</div>
</div>
<div class="safari chart"> <div class="tag">safari</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Circle Progression Plugin - Script Codes CSS Codes
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box;
}
body, html { background:#333333;
}
.chart { position:relative; margin:30px auto 0 auto;
}
.tag { width:100%; font-family:"Trebuchet", trebuchet, sans-serif; text-align:center; position:absolute; top:43%; color:#777777;
}
Circle Progression Plugin - Script Codes JS Codes
(function($){ $.fn.percentPie = function(options){ var settings = $.extend({ width: 100, trackColor: "EEEEEE", barColor: "777777", barWeight: 30, startPercent: 0, endPercent: 1, fps: 60 }, options); this.css({ width: settings.width, height: settings.width }); var that = this, hoverPolice = false, canvasWidth = settings.width, canvasHeight = canvasWidth, id = $('canvas').length, canvasElement = $('<canvas id="'+ id +'" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>'), canvas = canvasElement.get(0).getContext("2d"), centerX = canvasWidth/2, centerY = canvasHeight/2, radius = settings.width/2 - settings.barWeight/2; counterClockwise = false, fps = 1000 / settings.fps, update = .01; this.angle = settings.startPercent; this.drawArc = function(startAngle, percentFilled, color){ var drawingArc = true; canvas.beginPath(); canvas.arc(centerX, centerY, radius, (Math.PI/180)*(startAngle * 360 - 90), (Math.PI/180)*(percentFilled * 360 - 90), counterClockwise); canvas.strokeStyle = color; canvas.lineWidth = settings.barWeight; canvas.stroke(); drawingArc = false; } this.fillChart = function(stop){ var loop = setInterval(function(){ hoverPolice = true; canvas.clearRect(0, 0, canvasWidth, canvasHeight); that.drawArc(0, 360, settings.trackColor); that.angle += update; that.drawArc(settings.startPercent, that.angle, settings.barColor); if(that.angle > stop){ clearInterval(loop); hoverPolice = false; } }, fps); } this.mouseover(function(){ if(hoverPolice == false){ that.angle = settings.startPercent; that.fillChart(settings.endPercent); } }); this.fillChart(settings.endPercent); this.append(canvasElement); return this; }
}(jQuery));
$(document).ready(function() { $('.google').percentPie({ width: 100, trackColor: "#444444", barColor: "#2682D5", barWeight: 20, endPercent: .9, fps: 60 }); $('.moz').percentPie({ width: 100, trackColor: "#444444", barColor: "#33CBE0", barWeight: 20, endPercent: .75, fps: 60 }); $('.safari').percentPie({ width: 100, trackColor: "#444444", barColor: "#60DB5C", barWeight: 20, endPercent: .5, fps: 60 });
});

Developer | Adam Grayson |
Username | agrayson |
Uploaded | November 10, 2022 |
Rating | 3.5 |
Size | 2,612 Kb |
Views | 24,276 |
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 |
Random Weapon Generator | 4,209 Kb |
Spinning Circles | 3,581 Kb |
Simple Accordion | 2,952 Kb |
Minimal Solar System | 3,425 Kb |
Dungeon Crawler | 3,644 Kb |
SVG Animation - Circle Fill | 3,322 Kb |
CCS3 Navigation Hover Effect | 1,953 Kb |
Dynamic circle menus with SASS | 3,928 Kb |
Sliding Lines Animation | 2,572 Kb |
Custom Select Element | 3,616 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 |
Client-side Email Validation | Collizo4sky | 1,538 Kb |
Table border-collapse property | Maxds | 1,672 Kb |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
CSS Donut Charts | Seanstopnik | 2,908 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
Hmmm... | Rk007 | 4,848 Kb |
Large canvas mousemove experiment | Jibbon | 2,885 Kb |
Compare resources on mobile sites | Gyusza | 3,226 Kb |
Gradient-ui-button-mark-fx | Tabspace | 1,881 Kb |
Simple CSS loader. | Cabrera | 2,574 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!