Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 778 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 778 Bytes

Allgray.js

A tiny jQuery plugin for decolorizing elements

Usage

Include jQuery and the plugin on your page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="allgray.js"></script>

and the CSS stylesheet

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

Decolorize the element by using jQuery selector and calling the Allgray() method.

<script>
$("yourElem").Allgray();
</script>

Use the all Selector (“*”) to turn the whole page to grayscale.

<script>
$('*').Allgray();
</script>

Call the Allgray() method again to turn the element back to the original color.