Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のコードを検討してください
$('.item_select').each(List); function List() { var x= this.siblings('.fooClass'); }
この方法で兄弟にアクセスしようとすると、 「オブジェクトはプロパティまたはメソッド'兄弟'をサポートしていません」というエラーが表示されます。
'this'オブジェクトの兄弟にアクセスするにはどうすればよいですか?
$('.item_select').each(List); function List() { var x= $(this).siblings('.fooClass'); }