A tiny jQuery plugin for decolorizing elements
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.