Problem with click in img in front a div
Hi friends!
I'm developing a website with a image gallery build manually by myself.
The problem is when I do a click in the img (class galeria) it's just faded, but, I created the event for just the click in two div's (id subGaleria and id overley), but not for the img (class galeria).
I appreciate a help of you.
I show the code of events and html below.
Thanks!
JQUERY:
- //Quando houver um click no body
- $("#overlay, div#galeria").click(function() {
- //Oculta a div com o overlay e com a galeria
- $("#overlay, div#galeria, div#galMiniFotos").fadeOut("low");
- //Permite a rolagem (scroll) na página
- $("html, body").css("overflow", "auto");
-
- });
CSS:
- div#galeria{
- position:absolute;
- width: 100%;
- height: 85%;
- display:none;
- top:5%;
- z-index:101;
- }
- div#overlay{
- background-color:#000;
- opacity:0.8;
- filter:alpha(opacity=80);
- display:none;
- position:fixed;
- top:0px;
- bottom:0px;
- left:0px;
- right:0px;
- z-index:100;
- }
- img.galeria{
- max-height: 100%;
- max-width: 90%;
- border:2px solid #000;
- -moz-box-shadow: 0 2px 5px #333;
- -webkit-box-shadow: 0 2px 5px #333;
- z-index: 102;
- }
HTML:
-
<div id="galeria">
<div id="subGaleria">
<img class='galeria' src="pictures/1.png" />
</div>
</div>