Skip to content

pranavrc/frequency

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

frequency.js

XKCD-inspired frequency-based blinker http://xkcd.com/1331/

Usage

Download frequency.js.

Set up your script tags:

<script src="http://code.jquery.com/jquery-1.11.0.min.js"><script>
<script src="/path/to/frequency.js"><script>

Add the attribute data-frequency="<time period in seconds>" to any element that you want to flash:

<span data-frequency="2.71828">This will flash once in 2.71828 seconds.<span>
<span data-frequency="10">This will flash once in 10 seconds.<span>

And we're done!

About

Flashing HTML elements based on periodic events. XKCD-inspired.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published