在Safari中显示/隐藏似乎有问题。新加载的网站看起来不错。但如果你点击左上角的第一个链接,然后返回,显示/隐藏功能就不能很好地工作了,你会得到一个又一个层。注意:此问题仅在Safari中出现。
我已经使用了jQuery,下面是我的Show Hide代码:
站点链接:http://www.smudesign2012.co.uk/
我建议您使用jQuery来显示/隐藏元素。
function show(id){
$('.student').hide(); // hide all students
$('#'+id).show(); // show the student with applied ID
}
function hide(id){
$('#'+id).hide(); // is this needed? Why not do the next one and skip the parameter to the function?
$('.student').hide();
}
这篇关于在Safari中无法正确隐藏JavaScript显示/隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持吉威生活!
[英文标题]Javascript show/hide will not hide properly in Safari
声明:本媒体部分图片、文章来源于网络,版权归原作者所有,如有侵权,请联系QQ:330946442删除。