This seems a bit closer to a more comfortable user interface feel:
$(document).ready(function() { $('.grid li').hover(function(){ $('.grid-hover').stop(); $('.grid-hover').fadeOut(500); $('.grid-hover', this).fadeIn(500); }, function(){ $('.grid-hover', this).fadeOut(500); }); });
Not perfect .. of course. The on hover jquery event is hard to do right; especially with animation. It is necessary to carefully monitor the logic and timing of things. I would play with the .stop()
jQuery function, which stops the animation on the elements; as well as the JavaScript function setTimeout()
.
source share