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.
$(this).parent().next().css('display','none');
上記は、現在の兄弟のすぐ隣にある兄弟のみを非表示にします。
複数あると失敗します。
使用する必要がありますnextAll()
nextAll()
$(this).parent().nextAll().css('display','none');
またはさらに良い:
$(this).parent().nextAll().hide()