jQuery Plugin For Creating Firefly Flying Background - FireFly

jQuery Plugin For Creating Firefly Flying Background - FireFly
File Size: 6.63 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

FireFly is a fancy and interesting jQuery plugin that creates random firefly flying animations within an Html DOM element.

How to use it:

1. Load the latest jQuery javascript library and jQuery firefly plugin at the end of your page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
<script src="jquery.firefly.js"></script> 

2. Call the plugin on an DOM element. 

<script>
$(function(){
$.firefly();
});
</script>

3. Customize the firefly flying animation.

<script>
$(function(){
$.firefly({
total:    50,   // anything over a few hundred is gonna crawl
boundary: 100,  // avoid the edge of the window
fast:     5,    // fastest spark (a lower number is faster)
slow:     1,    // slowest spark (a higher number is slower)
limit:    3600, // stop after this many seconds (one hour)});
});
</script>

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