Is there any way to blur images with JavaScript/jQuery so that when they are blured I can sharpen them by hovering them with the mouse?
Asked
Active
Viewed 2,381 times
2
-
possible duplicate of http://stackoverflow.com/questions/1966949/gaussian-blur-onhover-using-jquery – g_thom Aug 11 '11 at 08:04
2 Answers
1
Pixastic can do that for you. Here's the relevant doc: http://www.pixastic.com/lib/docs/actions/blur/
To blur:
Pixastic.process(document.getElementById('demoimage'), 'blur');
To revert:
Pixastic.revert(document.getElementById('demoimage'));
The entire solution with jQuery:
var blur = function () {
Pixastic.process(this, 'blur');
};
var unblur = function () {
Pixastic.revert(this);
};
$('img').each(blur).hover(unblur, blur);

katspaugh
- 17,449
- 11
- 66
- 103
-
-
you are wellcome ... didn't see the comment before :D ... i tried it and it worked :) – Aug 11 '11 at 09:46
1
There is a plugin for jQuery called blur.js http://blurjs.com which uses my very fast Stack Blur algorithm: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html

Quasimondo
- 2,485
- 1
- 22
- 30