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,288 |
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 Select Element | 3,616 Kb |
Custom Event Policing | 3,255 Kb |
Form Progress Bar | 4,644 Kb |
Responsive square grid in pure CSS | 2,140 Kb |
Spinning Circles | 3,581 Kb |
Dynamic circle menus with SASS | 3,928 Kb |
Dungeon Crawler | 3,644 Kb |
CCS3 Navigation Hover Effect | 1,953 Kb |
Multi-Column Responsive Carousel | 5,686 Kb |
SVG Animation - Circle Fill | 3,322 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 |
Clock | Martingrand | 3,520 Kb |
Confirm Close Of Foundation Reveal Modal | Winghouchan | 1,818 Kb |
IPhone5S SVG Space Grey | Onlinechris | 75,035 Kb |
Search field | Jamesbarnett | 2,100 Kb |
Zeichensatz | Moklick | 2,058 Kb |
A Pen by Manoz | Manoz | 2,424 Kb |
Replace url via jquery | Serluk | 1,429 Kb |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
Animated Vertical CSS3 Menu Black | MaCeLMp4 | 2,750 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 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!