gpt4 book ai didi

jquery - div的定时显示

转载 作者:行者123 更新时间:2023-11-28 04:00:13 24 4
gpt4 key购买 nike

我只需要一些客户端代码 jQuery 或 JS,它们将在 X 秒后改变 div 样式

visibility : hidden; 或者 max-height : 50px;

或者切换DIV的class\id ( preferred )

最佳答案

使用 setTimeout

setTimeout(function(){
// Change the style here... If using jQuery, it turns
$('#my_divs').css({'visibility':'hidden', 'max-height':'50px'})
// or
$('#my_divs').addClass('my-custom-class');
}, x_seconds);

关于jquery - div的定时显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3673719/

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