Animating a Filter via jQuery

var $elem = $('#filtered'); $elem.mouseenter(function(){ $(this).animate({ pixels: 10 },{ step: function(now,fx) { $(this).css('polyfilter','blur(' + Math.round(now) + 'px)'); }, duration: 500 },'swing'); }); $elem.mouseleave(function(){ $(this).animate({ pixels: 0 },{ step: function(now,fx) { $(this).css('polyfilter','blur(' + Math.round(now) + 'px)'); }, duration: 500 },'swing'); });