Pixel Christmas Tree
A lightweight jQuery plugin that creates a Pixel Christmas tree with flickering lights. Spread holiday cheer with a dash of nerd on your web page or app!
Demo
See live demo
Setup
- Reference the JavaScript and CSS files
<link rel="stylesheet" href="css/pixelxmas-1.0.0.min.css">
<script src="js/pixelxmas-1.0.0.min.js"></script>
- Create a div with id "tree-canvas" in your HTML
<div id="tree-canvas"></div>
- Initialize plugin in your main JavaScript file
$('#tree-canvas').pixelxmas();
Options
- numRows - Default is 16. Number of rows you want the tree to have.
- lightFlickerSpeed - Default speed is 500. Speed at which the lights on the tree flicker.
Options Usage
$('#tree-canvas').pixelxmas({
numRows: 24,
lightFlickerSpeed: 100
});
Dependencies
- jQuery