gpt4 book ai didi

jquery - 没有方法 'siblings'

转载 作者:行者123 更新时间:2023-12-03 22:56:56 25 4
gpt4 key购买 nike

我正在尝试更改 div 元素的同级元素,这是我使用的语句

$('.edit').click(function(){
this.siblings('.innerInfo').html("success");
});

它不断抛出 <HTMLDivElement> has no method 'siblings'异常(exception),我真的不明白为什么。我已经启动了 jQuery,并在 document.ready 上启动了脚本。

感谢您的帮助!

最佳答案

使用$(this)而不是this

关于jquery - <HTMLDivElement> 没有方法 'siblings',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6229198/

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