javascript - Creating thumbnail overlay in CSS -
i'm trying create layer on thumbnail shows information photo ,
i'm using jquery create hover effect ,
but faced hover problem , can check out code , preview here :
my js code : $('img').hover(function(){ $(this).next('.mask').fadein(); },function(){ $(this).next('.mask').fadeout(); });
full css/html/js code :
jsfiddle how can solve problem , make jquery hover normal?
the effect you're getting because show .mask
above img
. since hover event on img
, putting .mask
on fire mouseleave
event, fade .mask
out again. when .mask
has faded out, mouse hovering on img
, .mask
fade in , repeated.
i suggest using 100% css this. there no need js.
Comments
Post a Comment