jquery点击不使用css'position:fixed'属性

DoY*_*ift 7 html css jquery

当我删除这个属性它工作正常,为什么会这样?

这是jquery函数:

 $(document).ready(function(){
 $('#flogo').click(function(){

   window.alert("clicked");

})
});
Run Code Online (Sandbox Code Playgroud)

这是Html代码:

<div id="fblike" class="fixedlogo"><img src="images/likelogo.png" id="flogo" />    </div>
Run Code Online (Sandbox Code Playgroud)

这是css:

 .fixedlogo
{
position: fixed; //If i remove this line then jquery is working.
height:50px;
margin-top: -20px;
}
Run Code Online (Sandbox Code Playgroud)

Bra*_*ham 8

这可能是一个问题,z-index而不是jQuery.jQuery不关心这个位置是什么.我怀疑还有另一个元素与此重叠,并阻止了click事件.