gpt4 book ai didi

IE 11 中的 jQuery SlideUp() 和 SlideDown() 不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 17:52:40 24 4
gpt4 key购买 nike

我想为我的帮助网站做一些上下滑动的菜单。我有这段代码:

$(".li_about").click(function(){
if ($(".ul_about").is(":hidden")) $(".ul_about").slideDown(400);
else $(".ul_about").slideUp(400);
})

<div id="left-contener">
<ul id="menu">
<li class="li_about" style="background-image: url(icons/PNG/color_128/info2.png);"><span>O programie<span> </li>
<li class="sep_1"></li>
<ul class="ul_about">
<li name="about" >Czym jest Creator?</li>
<li class="sep"></li>
<li name="first">Twój pierwszy obraz</li>
<li class="sep"></li>
</ul>
etc [...]

#left-contener{
position:relative;
z-index: 5;
width:30%;
max-width:400px;
height:calc(100% - 45px);
background-color: #F8F8F8;
float:left;
white-space: nowrap;
overflow-x: hidden;
overflow-y:scroll;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#menu{
margin-top:10px;
margin-left:15px;
}
ul {
list-style:none;
padding:0;
margin:0;
}
li:not(.sep_1):not(.sep){
height:40px;
line-height: 40px;
cursor:pointer;
background-repeat: no-repeat;
background-size: 30px 30px;
background-position: 0px 5px;
text-indent: 40px;
}
li:not(.sep):not(.sep_1):hover{
text-indent:50px;
color:#16C0FF;
}
.ul_tools,.ul_about,.ul_main{
display: none;
}

为什么 SlideDown() 和 SlideUp() 在 IE (11) 中不起作用?其他浏览器没问题。

附言。一些更多的文本因为 Stackoveflow 说我需要多说一些,但我想我已经足够解释我的问题了......

最佳答案

您可以只使用 .slideToggle() 吗?这可能是一个愚蠢的问题,但是 jQuery 加载正确吗?

$(".li_about").click(function(){
$(".ul_about").slideToggle(400);
});

关于IE 11 中的 jQuery SlideUp() 和 SlideDown() 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26998382/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com