ie7 jQuery.click only registers when target has background
.trigger
{
display : block ;
width : 100% ;
height : 100% ;
z-index : 3 ;
position : relative;
/* BACKGROUND: #0f0; */
cursor : pointer ;
zoom:1;
}
.trigger div
{
display : block ;
background : #fff;
position : absolute ;
width : 48px;
height : 48px ;
left : 0px ;
top : 0px ;
filter:alpha(opacity=10);
opacity : 0.1;
}
.trigger:hover div
{
filter:alpha(opacity=30);
opacity : 0.3;
}
$('.trigger').click(function(){
//doIt
})
<div id="wallItem218" class="wallItem" style="width: 48px; height: 48px; overflow: hidden; float: left; position: static; display: block;">
<img class="thumb" src="http://bouwmaat.brandinteractive.nl/modules_media/wall/thumb/16.jpg" style="width: 4开发者_Go百科8px; height: 48px;">
<img class="large" style="display: none; width: 48px; height: 48px;" src="http://bouwmaat.brandinteractive.nl/modules_media/wall/large/16.jpg">
<div class="trigger" style="width: 48px; height: 48px; top: -48px; cursor: pointer;">
<div></div>
</div>
</div>
code is above. If i activate the background value on the .trigger
, i can click the element to do something. If i remove the background, i can't click it anymore.
Any ideas?
Workaround: using transparent GIF image
精彩评论