< HTMLDivElement>没有方法'兄弟姐妹' [英] <HTMLDivElement> has no method 'siblings'
本文介绍了< HTMLDivElement>没有方法'兄弟姐妹'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图改变一个div元素的兄弟,这是我使用的语句
Im trying to change a sibling of a div element and this is the statement i used
$('.edit').click(function(){
this.siblings('.innerInfo').html("success");
});
它不断抛出< HTMLDivElement>没有方法'兄弟姐妹'
异常,我真的不明白为什么。我已经启动了jQuery,并启动了 document.ready
It keeps throwing the <HTMLDivElement> has no method 'siblings'
exception, and i really cant figure out why. I've initiated jQuery and ive started the script on document.ready
感谢您的帮助!
推荐答案
使用 $(this)
而不是 / code>。
Use $(this)
instead of this
.
这篇关于< HTMLDivElement>没有方法'兄弟姐妹'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文