Adds a broken lightbulb style flickering effect to any DOM element.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
index.html Fixes issues with event binding and adds additional options Jul 5, 2012
jquery.flicker.js Adds an update to provide accurate math for min value Jul 5, 2012
readme.md

readme.md

jQuery Flicker

Make things flicker like broken lightbulbs

// Basic Usage:
// -------------------------------------------------- //

$(".selector").flicker();


// Options:
// ----------------------------------------------- //

$.fn.flicker.defaults = {
    minOpacity: 0.7,     // Opacity will not go below this value
    maxOpacity: 1,       // Opacity will not exceed this value
    transition: 200,     // The speed of the animation
    delay: 75,           // The time between changes
    probability: 0.1     // The probability of a flickering event
};


// Methods:
// -------------------------------------------------- //

$(".selector").flicker(); // Start
$(".selector").flicker("stop"); // Stop