Skip to content

jQuery plugin to pixelate images and, optionally, reveal on hover

Notifications You must be signed in to change notification settings

edknittel/pixelate.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixelate.js

pixelate.js is a simple jQuery plugin to pixelate any set of images and optionally reveal them on hover.

Demo here

Example

<img src="test.jpg" width="200" height="200" data-pixelate>

You may also pixelate an image via JavaScript (with jQuery) like so:

$('img#myimage').pixelate();

Options

  • value The percentage of pixelation to perform, a value between 0 and 1
  • reveal Reveal the image on hover and remain revealed if clicked

These options may be specified by data tags, like so:

<img src="img.jpg" data-pixelate data-value="0.5" data-reveal="false">

or by jQuery/JavaScript:

$('img#myimage').pixelate({ value: 0.5, reveal: false });

License

MIT

About

jQuery plugin to pixelate images and, optionally, reveal on hover

Resources

Stars

Watchers

Forks

Packages

No packages published