프로젝트
GitHub에서 보기
lcdsantos/jquery-drawsvg
lcdsantos/jquery-drawsvg has 766 GitHub stars and 135 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-19 06:00 UTC. Last push 2016-10-22.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
Lightweight, simple to use jQuery plugin to animate SVG paths
창작 및 미디어README.md
OriginaljQuery DrawSVG
This plugin uses the jQuery built-in animation engine to transition the stroke on every <path> inside the selected <svg> element, using stroke-dasharray and stroke-dashoffset properties.
- Weighs less than 2KB minified and 800 bytes gzipped.
- Easy to use.
- Easing and stagger support.
- Free!
Usage
Include jQuery DrawSVG after jQuery
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="jquery.drawsvg.js"></script>
Initialize the plugin on the element you want to animate and store in a variable
var mySVG = $('#my_svg_element').drawsvg();
Run the animation
mySVG.drawsvg('animate');
Look at the demos for more advanced usages.
Options
| Option | Type | Default | Description |
|---|---|---|---|
duration |
Integer | 1000 |
The time to complete the animation of each path. |
stagger |
Integer | 200 |
Delay to start animating each individual path. |
easing |
String | swing |
Which easing function each path will use to transition. Use jQuery Easing Plugin for different easing functions. |
reverse |
Boolean | false |
Direction that the line will be drawn. |
callback |
Function | function() {} |
A function to call once the animation has been completed. |