我得到了这个功能,在Firefox和Chrome中运行良好,但在IE中效果不佳。.MAIN display:块不工作。有什么想法吗?
http://jsfiddle.net/cYrqY/35/此示例不能很好地工作,对不起
obj.click(function(){
if(obj.ck_hotspot){
obj.ck_hotspot = false;
}
else {
if($.browser.msie){
obj.hotspot_bub.css("display","none");
}
else {
obj.hotspot_bub.fadeOut("slow");
$('.main').css('display','block');
}
}
})
obj.hotspot.children("a").click(function(){
obj.ck_hotspot = true;
_this_bub = $(this).next(".hotspot_bub");
if(_this_bub.css("display") == "none"){
if($.browser.msie){
obj.hotspot_bub.css("display","none");
_this_bub.css("display","block");
}
else {
obj.hotspot_bub.fadeOut("slow");
_this_bub.fadeIn("slow");
$('.main').css('display','none');
}
}
});发布于 2012-02-15 00:22:22
作为第一个想法,你可以通过编写$('main').hide();来节省时间,它会自动将display: none;添加到你的css中,并且你可以轻松地知道你输入的内容更少:)。
同样的事情也适用于.show();。它将添加display:block;
我似乎根本不能让jsFiddle在safari中工作。
https://stackoverflow.com/questions/9280315
复制相似问题