jQuery plugin to colorize data elements
Switch branches/tags
Nothing to show
Clone or download
Latest commit cab6700 Aug 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec
src
.0pdd.yml #1 skeleton Aug 2, 2018
.gitattributes #1 skeleton Aug 2, 2018
.gitignore
.pdd
.rultor.yml #1 fix Aug 26, 2018
.travis.yml
LICENSE.txt #1 skeleton Aug 2, 2018
README.md
gulpfile.js #1 skeleton Aug 2, 2018
package-lock.json 1.1.1 Aug 26, 2018
package.json

README.md

DevOps By Rultor.com

Build Status PDD status License NPM version

It's a simple jQuery plugin to colorize data elements according to its value:

$('#foo').colorizejs({ 500: 'green', 0: 'red' });

If the value of #foo is larger than 500, its color will be set to green, if larger than zero, it will be set to red, otherwise it will not be touched.

You can also use classes instead of colors, but prepending them with a dot:

$('#foo').colorizejs({ 500: '.green', 0: '.red' });

The easiest way is to just include it in your HTML from the RawGit CDN:

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://cdn.rawgit.com/yegor256/colorizejs/gh-pages/colorizejs.min.js"/>
  </head>
</html>

Download the latest release.

You can also install it with npm:

$ npm install colorizejs

How to Contribute

First, make sure you can build it locally:

$ npm install --global gulp-cli
$ gulp

The build has to be clean. If it's not, submit an issue.

Then, make your changes, make sure the build is still clean, and submit a pull request.