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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -