javascript - 选择时等待的方法已生成选项
问题描述
我搜索了我在下面使用的方法的替代方法,以等待所选插件在执行操作之前生成所有选项。
var interval = setInterval(function() {
if($('.chosen-single > span')){
// do something
clearInterval(interval);
}
}, 100);
解决方案
if you can console the $('.chosen-single > span')
,and you will know what error occurred.You should use another method to judge the node is shown.
推荐阅读
- docker - 在尝试容器化 WebdriverIO 测试时,我收到以下错误:webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:4444
- python - django.db.utils.IntegrityError:唯一约束失败:first_app_topic.top_name
- redirect - 阿帕奇配置问题
- ruby-on-rails - Rails 中如何使用“manifest.json”
- python - 如何在 Django 中添加多态类?
- opentok - TokBox/OpenTok/Vonage 流式混合 Howto
- reactjs - “React 检测到 Hook 的顺序发生了变化”
- python - 如何使用 webdriver 和 python 来提高执行时间
- emotion - @emotion/core @emotion/styled 情感主题可以与电子一起使用吗?
- amazon-web-services - 请求解除对 AWS EC2 上的端口 25 的阻塞