Skip to content

Instantly share code, notes, and snippets.

@motyar
Created January 11, 2012 13:28
Show Gist options
  • Save motyar/1594647 to your computer and use it in GitHub Desktop.
Save motyar/1594647 to your computer and use it in GitHub Desktop.
FireFly Effect on web
<!doctype html>
<head>
<style>
body{
background:black;
}
#header{
width:700px;
height:300px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://raw.github.com/motyar/firefly/master/jquery-firefly-0.2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.firefly({
images : ['http://www.itsfirefly.com/images/fly1by1.png','http://www.itsfirefly.com/images/fly2by2.png'], //Fly images
total : 165, //number of flies
on: '#header' //id of div
});
});
</script>
</head>
<body>
<br /><br /><br /><br /><br /><br />
<div id="header">
</div> <!-- /#header -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment