gpt4 book ai didi

JQuery 检查是否显示了 Div

转载 作者:技术小花猫 更新时间:2023-10-29 11:36:26 25 4
gpt4 key购买 nike

<分区>

这就是我最终要实现的目标:

//When the user clicks the liveshow button this happens
$(".liveshow-button").live('click', function() {
if ($(".liveshowDiv2").css('display') == 'none') {
$(".liveshowDiv2").fadeOut(ifadeOutSpeed, function() {
$('#wrapper-div').animate({
height: $('.liveshowDiv1').height() + "px"
},
iresizeSpeed, function() {
$('.liveshowDiv1').fadeIn(ifadeInSpeed, function());
});
});
}
else {
alert('This never gets displayed');
$(".liveshowDiv1").slideUp('fast');
}
});

基本上,当您单击此按钮时,我想在显示和隐藏 liveShowDiv1 之间切换。但是由于页面上的其他内容可以使 liveShowDiv1 隐藏,我不能只创建一个切换功能来执行此操作。我必须以某种方式检查 liveShowDiv1 是否正在显示。

不显示时:display = none

显示时显示完全不在样式标签中

我如何在 JQuery 中判断此 div 何时显示?

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