Generate Animated SVG Lines With jQuery - ckLine.js

File Size: 16.8 KB
Views Total: 4547
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Generate Animated SVG Lines With jQuery - ckLine.js

ckLine.js is a funny jQuery plugin for generating random customizable SVG lines with fade in & fade out animations on the web page.

How to use it:

1. Load the latest version of jQuery library and the jQuery ckLine.js plugin in the html document.

<script src="//"></script>
<script src="jquery.ckLine.js"></script>

2. Create an empty SVG element on the web page.

<svg id="ckLine" xmlns="">

3. Call the function on the SVG element to generate default lines on the web page.


4. Customize the SVG lines with the following options.


  // SVG ID
  svgId: null,

  // stroke coor
  strokeColor: "#000",

  // stroke width
  strokeWidth: 2,

  // animation speed
  animateTime: 1000,

  // interval
  interval: 600,

  // time before fade out
  fadeOutTime: 800,

  // duration
  lifeTime: 2000,

  // width/heigh of the svg
  width: viewportwidth,
  height: viewportHeight,

  // only horizontal lines
  leftRight: true,

  // easing function
  easing: 'swing',

  // an array of time ranges
  animationTimeRange: []

Change log:


  • Fix Firefox Bug

This awesome jQuery plugin is developed by captainKeller. For more Advanced Usages, please check the demo page or visit the official website.