Add a firefly effect to your site with jQuery fireFly
This is a guest post by Motyar, a fellow developer from India.
Hi, this is Motyar D, Web services and API developer. I want to introduce you with my new jQuery plugin named fireFly. As the name says, the plugin can be used to add firefly effect on any web page background. Last month I updated it to work on a particular div background too. I hope you will find it helpful.
Demos
- A known website using this is itsfirefly.com
- Another working demo
Download
You can download the plugin on github. Also, feel free to fork!
How to use
Include jQuery and the plugin file
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src=" https://raw.github.com/motyar/firefly/master/jquery-firefly-0.2.js "> </script>
Call the plugin
$(document).ready(function() {
$.firefly({
images : ['images/fly1by1.png', 'images/fly2by2.png'], //You can change images
total : 65 // You can edit the number of flies
});
});
If you want the fireFly effect limited inside a div you can add on: '#divID', like this:
$(document).ready(function() {
$.firefly({
images : ['images/fly1by1.png', 'images/fly2by2.png'], //You can change images
total : 65, // You can edit the number of flies
on: '#header' // id of div
});
});
About the author
I am Motyar D Web services and API developer.
I am on twitter: @motyar
My blog: http://motyar.blogspot.com
You can get more about me on Google+





k24 • February 2, 2012 23:31
David • March 20, 2012 14:49
David • March 22, 2012 13:36
David • March 22, 2012 14:09
Chan Luu Costume Fashion Jewellery • April 6, 2012 10:37
Motyar • April 27, 2012 21:32
Kawsar • June 3, 2012 16:56
http://bit.ly/KXrI9u
mate • June 14, 2012 17:59
Faisal • June 18, 2012 19:10
Leena • June 22, 2012 10:06
Carl Rivers • July 7, 2012 14:08
Web Application Development Boston
M Zoref • August 5, 2012 22:56
M Zoref • August 12, 2012 23:57
Taha Ziaee • August 13, 2012 02:44
Fred • October 17, 2012 05:50
George Marshall • November 15, 2012 09:56
Motyar • December 26, 2012 09:50
Zimmet Vein & Dermatology - Austin • January 16, 2013 20:05
Dawid • January 20, 2013 14:42
Best to see this is to hit refresh few times until You will see what I mean.
How to fix it ?
Dawid • January 20, 2013 14:46
Rohan Shewale • February 24, 2013 14:43
I worked on stars with the help of this.
Rodrigo • March 21, 2013 05:53
change the line 75 on the jquery.firefly.min.js
from
'z-index': $.firefly.random(20),
to
'z-index':1,
and you will solve the problem about z-index.
Encrypto • March 24, 2013 12:04
body {
overflow-x:hidden;
}
1n3gan • April 6, 2013 22:22
RUstam • May 9, 2013 09:02
And to top it disappeared?
I need an effect like sparks from a fire and not like fireflies