Interactive jQuery plugin To Turn Out The Lights - Flashlight

File Size: 31.9 KB
Views Total: 2308
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Interactive jQuery plugin To Turn Out The Lights - Flashlight

flashlight.js is an interactive jQuery plugin lets users turn the lights out and explore your site using a flashlight.

See also:

How to use it:

1. Include required the style.css stylesheet in your document's head section.

<link rel="stylesheet" href="style/style.css">

2. Include jQuery JavaScript library and the flashlight.js script on your web page.

<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="scripts/jquery.flashlight.js"></script>

3. Call the plugin on the body tag.

// $('body').flashlight(width, darkness, gremlin);
$('body').flashlight(200, 0.75, true);

4. Plugin parameters.

  • Darkness: Determines the opacity of the flashlight shadow.
  • Gremlin: If true, a gremlin will live on the page when the lights are turned off.
  • Width: Determines the diameter of the flashlight beam in pixels.

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