I'm trying to have a blurred effect on words when the mouse hovers over them. I would like the words to be blurred for a second or so and then return to standard words in the order that they were hovered on.
I've almost got it working, except only the last word hovered on returns to its initial state. The other words stay blurred. Does anyone have any suggestions? See my jsfiddle: http://jsfiddle.net/rrosegregoryy/tavh892w/
And the code I've tried that's not giving me the desired result:
var hoverTimeout;
$('span').hover(function() {
clearTimeout(hoverTimeout);
$(this).addClass('hovered');
}, function() {
var $self = $(this);
hoverTimeout = setTimeout(function() {
$self.removeClass('hovered');
}, 1000);
});
I'm quite new to javascript so I'm a little stuck!