Skip to content

Make your site's text "pop" with a full rainbow treatment

License

Notifications You must be signed in to change notification settings

rnagle/rainbows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rainbows.js

Make your site's text "pop" with a full rainbow treatment.

Inspired by such excellent html tags as marquee and blink.

See bit.ly/1T3G7mb for a demo.

Requires jQuery.

Usage:

As an HTML tag:

Simply include rainbows.js on your page and wrap anything you want in a <rainbow /> tag.

<rainbow data-speed="2" data-size="15">...</rainbow>

As a jQuery plugin:

Select elements you want to rainbow-ify:

$(document).ready(function() {
    $('body').rainbows();
});

Optionally pass speed and size parameters:

$(document).ready(function() {
    $('body').rainbows({
        speed: 2,
        size: 15
    });
});

Directly with the Rainbows constructor:

Rainbows accepts three arguments: container, speed and size.

For example:

var super_sweet_rainbow_text = new Rainbows('body', 3, 15);

Details:

  • container: CSS selector identifying the element whose text should be rainbow-ified.
  • speed: the duration (in seconds) of a rainbow cycle on the container's text.
  • size: the size of the rainbow color spread across the container's text.

About

Make your site's text "pop" with a full rainbow treatment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published